Skip to content

Commit 140b51d

Browse files
committed
update typescript to 5.0.0 in codebase!
restrict typescript imports refactor dead code in codebase
1 parent ff49e7d commit 140b51d

30 files changed

+119
-132
lines changed

.eslintrc.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,25 @@
1111
"@typescript-eslint/naming-convention": "off",
1212
"no-empty-function": "off",
1313
"no-useless-return": "off",
14-
"no-template-curly-in-string": "off"
14+
"no-template-curly-in-string": "off",
15+
"@typescript-eslint/no-explicit-any": "off",
16+
// better to fix rule
17+
"unicorn/consistent-destructuring": "off",
18+
"@typescript-eslint/no-restricted-imports": [
19+
"error",
20+
{
21+
"patterns": [
22+
{
23+
"group": [
24+
"typescript*",
25+
"!../*"
26+
],
27+
"message": "Use global ts type and variable instead"
28+
// "allowTypeImports": true
29+
}
30+
]
31+
}
32+
]
1533
},
1634
"overrides": [
1735
{
@@ -32,10 +50,8 @@
3250
"max-depth": "off",
3351
"@typescript-eslint/dot-notation": "off",
3452
"no-bitwise": "off",
35-
"@typescript-eslint/no-explicit-any": "off",
3653
// todo just not sure
3754
"@typescript-eslint/prefer-regexp-exec": "off",
38-
"unicorn/consistent-destructuring": "off",
3955
"no-negated-condition": "off",
4056
"@typescript-eslint/prefer-nullish-coalescing": "off",
4157
"unicorn/prefer-set-has": "off"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"watch-plugin": "node buildTsPlugin.mjs --watch",
9999
"build": "tsc && tsc -p typescript --noEmit && vscode-framework build && pnpm build-plugin",
100100
"build-plugin": "node buildTsPlugin.mjs && node buildTsPlugin.mjs --browser",
101-
"lint": "eslint src/**",
101+
"lint": "eslint {src/**,typescript/src/**}",
102102
"test": "pnpm test-plugin --run && pnpm integration-test",
103103
"test-plugin": "vitest --globals --dir typescript/test/ --environment ts-plugin",
104104
"integration-test": "node integration/prerun.mjs && tsc -p tsconfig.test.json && node testsOut/runTests.js",
@@ -119,7 +119,7 @@
119119
"tsm": "^2.3.0",
120120
"type-fest": "^2.13.1",
121121
"typed-jsonfile": "^0.2.1",
122-
"typescript": "^4.9.3",
122+
"typescript": "^5.0.2",
123123
"vite": "^4.1.1",
124124
"vitest": "^0.26.0",
125125
"vitest-environment-ts-plugin": "./vitest-environment-ts-plugin",

0 commit comments

Comments
 (0)