Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit ede4280

Browse files
authored
Merge pull request #346 from kachick/ts5
Migrate to TypeScript 5
2 parents cefb3f7 + b915e2d commit ede4280

File tree

5 files changed

+44
-24
lines changed

5 files changed

+44
-24
lines changed

.eslintrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ rules:
2424
'@typescript-eslint/no-unused-vars':
2525
- error
2626
- argsIgnorePattern: ^_
27+
# See https://zenn.dev/teppeis/articles/2023-04-typescript-5_0-verbatim-module-syntax for enabling reason
28+
'@typescript-eslint/consistent-type-imports': 'error'
29+
'@typescript-eslint/no-import-type-side-effects': 'error'
2730
parser: '@typescript-eslint/parser'
2831
parserOptions:
2932
ecmaVersion: 12

package-lock.json

Lines changed: 8 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"zod": "^3.21.4"
1919
},
2020
"devDependencies": {
21-
"@tsconfig/node18-strictest-esm": "^1.0.1",
2221
"@types/node": "^18.15.11",
2322
"@types/react": "^18.0.34",
2423
"@types/react-dom": "^18.0.11",
@@ -28,7 +27,7 @@
2827
"eslint": "^8.38.0",
2928
"eslint-plugin-deprecation": "^1.4.1",
3029
"ts-node-test": "^0.4.1",
31-
"typescript": "^4.9.5",
30+
"typescript": "^5.0.4",
3231
"vite": "^4.2.1"
3332
}
3433
}

tsconfig.base.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Import from https://github.com/tsconfig/bases/commit/0ae4791797d8ba3dd2bca9aca880eb2d3e30e6fb
3+
// To avoid issues around tsconfig.extends array
4+
"$schema": "https://json.schemastore.org/tsconfig",
5+
"display": "Node 18 + ESM + Strictest",
6+
"compilerOptions": {
7+
"lib": [
8+
"es2022"
9+
],
10+
"module": "es2022",
11+
"target": "es2022",
12+
"strict": true,
13+
"esModuleInterop": true,
14+
"skipLibCheck": true,
15+
"forceConsistentCasingInFileNames": true,
16+
"moduleResolution": "node",
17+
"allowUnusedLabels": false,
18+
"allowUnreachableCode": false,
19+
"exactOptionalPropertyTypes": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noImplicitOverride": true,
22+
"noImplicitReturns": true,
23+
"noPropertyAccessFromIndexSignature": true,
24+
"noUncheckedIndexedAccess": true,
25+
"noUnusedLocals": true,
26+
"noUnusedParameters": true,
27+
"verbatimModuleSyntax": true,
28+
"checkJs": true
29+
}
30+
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"extends": "@tsconfig/node18-strictest-esm/tsconfig.json",
2+
// TODO: Use tsconfig/base after all tools support tsconfig.extends array
3+
"extends": "./tsconfig.base.json",
34
"compilerOptions": {
45
// https://www.typescriptlang.org/docs/handbook/esm-node.html
56
"module": "node16",

0 commit comments

Comments
 (0)