editor/code: Use @tsconfig/strictest to define type checking rules

Motivation
-----------

This change aims to make it easier to manage tsconfig.
This intend to leave to create "ideal" rules about TypeScript's type checking.

Implementation
---------------

This change removes some duplicated rules defined in `@tsconfig/strictest` and add disabing some strict rules
that fails with the current codebase.
This commit is contained in:
Tetsuharu Ohzeki 2023-06-28 03:01:57 +09:00
parent 7c8ae35648
commit 0ddf8b63e9
3 changed files with 17 additions and 6 deletions

View File

@ -16,6 +16,7 @@
"vscode-languageclient": "^8.1.0" "vscode-languageclient": "^8.1.0"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/strictest": "^2.0.1",
"@types/node": "~16.11.7", "@types/node": "~16.11.7",
"@types/vscode": "~1.78.1", "@types/vscode": "~1.78.1",
"@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/eslint-plugin": "^5.60.1",
@ -195,6 +196,12 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/@tsconfig/strictest": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@tsconfig/strictest/-/strictest-2.0.1.tgz",
"integrity": "sha512-7JHHCbyCsGUxLd0pDbp24yz3zjxw2t673W5oAP6HCEdr/UUhaRhYd3SSnUsGCk+VnPVJVA4mXROzbhI+nyIk+w==",
"dev": true
},
"node_modules/@types/json-schema": { "node_modules/@types/json-schema": {
"version": "7.0.12", "version": "7.0.12",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",

View File

@ -48,6 +48,7 @@
"vscode-languageclient": "^8.1.0" "vscode-languageclient": "^8.1.0"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/strictest": "^2.0.1",
"@types/node": "~16.11.7", "@types/node": "~16.11.7",
"@types/vscode": "~1.78.1", "@types/vscode": "~1.78.1",
"@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/eslint-plugin": "^5.60.1",

View File

@ -1,18 +1,21 @@
{ {
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"esModuleInterop": false,
"module": "commonjs", "module": "commonjs",
"target": "es2021", "target": "es2021",
"outDir": "out", "outDir": "out",
"lib": ["es2021"], "lib": ["es2021"],
"sourceMap": true, "sourceMap": true,
"rootDir": ".", "rootDir": ".",
"strict": true, "newLine": "LF",
// These disables some enhancement type checking options
// to update typescript version without any code change.
"useUnknownInCatchVariables": false, "useUnknownInCatchVariables": false,
"noUnusedLocals": true, "exactOptionalPropertyTypes": false,
"noUnusedParameters": true, "noImplicitOverride": false,
"noImplicitReturns": true, "noPropertyAccessFromIndexSignature": false,
"noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": false
"newLine": "LF"
}, },
"exclude": ["node_modules", ".vscode-test"], "exclude": ["node_modules", ".vscode-test"],
"include": ["src", "tests"] "include": ["src", "tests"]