Skip to content

Commit

Permalink
fix: swapped ts-check comments to checkJs in tsconfig (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
esotuvaka authored Feb 6, 2023
1 parent 7b7a160 commit efe8b7f
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-bees-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

fix: swap `@ts-check` comments to `checkJs: true` in scaffolded app's tsconfig
1 change: 0 additions & 1 deletion cli/template/base/src/env/client.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
import { clientEnv, clientSchema } from "./schema.mjs";

const _clientEnv = clientSchema.safeParse(clientEnv);
Expand Down
1 change: 0 additions & 1 deletion cli/template/base/src/env/schema.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
import { z } from "zod";

/**
Expand Down
1 change: 0 additions & 1 deletion cli/template/base/src/env/server.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
/**
* This file is included in `/next.config.mjs` which ensures the app isn't built with invalid env vars.
* It has to be a `.mjs`-file to be imported there.
Expand Down
1 change: 0 additions & 1 deletion cli/template/extras/src/env/schema/with-auth-prisma.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
import { z } from "zod";

/**
Expand Down
1 change: 0 additions & 1 deletion cli/template/extras/src/env/schema/with-auth.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
import { z } from "zod";

/**
Expand Down
1 change: 0 additions & 1 deletion cli/template/extras/src/env/schema/with-prisma.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
import { z } from "zod";

/**
Expand Down
3 changes: 2 additions & 1 deletion cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"baseUrl": "./",
"paths": {
"~/*": ["./src/*"]
}
},
"checkJs": true
},
"include": ["src", ".eslintrc.cjs"]
}
2 changes: 1 addition & 1 deletion www/src/pages/en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Now, we realize this path doesn't work for everyone. So, if you feel like you've

As per [T3-Axiom #3](/en/introduction#typesafety-isnt-optional), we take typesafety as a first class citizen. Unfortunately, not all frameworks and plugins support TypeScript which means some of the configuration files have to be `.js` files.

We try to emphasize that these files are JavaScript for a reason, by explicitly declaring each file's type (`cjs` or `mjs`) depending on what's supported by the library it is used by. Also, all the `js` files in this project are still typechecked using a `@ts-check` comment at the top.
We try to emphasize that these files are JavaScript for a reason, by explicitly declaring each file's type (`cjs` or `mjs`) depending on what's supported by the library it is used by. Also, all the `js` files in this project are still typechecked using a checkJs option in the compiler (tsconfig).

## I'm struggling to add i18n to my app. Is there any reference I can use?

Expand Down

1 comment on commit efe8b7f

@vercel
Copy link

@vercel vercel bot commented on efe8b7f Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.