build: enable strict tsconfig flags for new code, keep legacy lenient
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:39:06 +0530
3 files changed,
39 insertions(+),
3 deletions(-)
M
package.json
→
package.json
@@ -56,7 +56,7 @@ "typebox": "*",
"typescript": "^5.0.0" }, "scripts": { - "typecheck": "tsc --noEmit", + "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.legacy.json", "prepublishOnly": "tsc --noEmit" }, "publishConfig": {
M
tsconfig.json
→
tsconfig.json
@@ -4,15 +4,31 @@ "target": "ES2022",
"module": "ESNext", "moduleResolution": "bundler", "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + "noPropertyAccessFromIndexSignature": true, + "forceConsistentCasingInFileNames": true, "esModuleInterop": true, "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, "outDir": "./dist", "rootDir": "./src", "declaration": true, "declarationMap": true, "sourceMap": true }, - "include": ["src/**/*.ts"], + "include": [ + "src/util/**/*.ts", + "src/cdp/**/*.ts", + "src/client.ts", + "src/domains/**/*.ts", + "src/schemas/**/*.ts", + "src/registry.ts" + ], "exclude": ["node_modules", "dist"] }
A
tsconfig.legacy.json
@@ -0,0 +1,20 @@
+{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noUnusedLocals": false, + "noUnusedParameters": false, + "noUncheckedIndexedAccess": false, + "exactOptionalPropertyTypes": false, + "noPropertyAccessFromIndexSignature": false + }, + "include": [ + "src/daemon.ts", + "src/tools.ts", + "src/index.ts", + "src/protocol.ts", + "src/renderers.ts", + "src/setup.ts", + "src/state.ts", + "src/prompt.ts" + ] +}