Three strictness flags that the codebase already satisfies (0 errors each): - noFallthroughCasesInSwitch on src + e2e — a missing `break` is now a type error. - noUnusedLocals + noUnusedParameters on the e2e project, so it matches src and node and dead spec scaffolding can't accumulate (it was the one project without them). - allowJs + checkJs on the node project, pulling tailwind.config.js and postcss.config.js under the type checker (the last hole in C-4.5) — a real type error in either is now caught (verified: `content: 123` fails; Config stays permissive on plugin keys by design). noUncheckedIndexedAccess is NOT here — it has 98 call-site fixes and lands as its own reviewable sub-sprint (S3b).
35 lines
1.6 KiB
JSON
35 lines
1.6 KiB
JSON
{
|
|
// The build-tool configs run in Node, not the browser: they need node types and must NOT be
|
|
// checked against the app's DOM lib. Split out because tsconfig.json's `include` is ["src"],
|
|
// so until now nothing type-checked these files at all (R2 / C-4.5). `npm run typecheck`
|
|
// runs this project alongside src and e2e.
|
|
"compilerOptions": {
|
|
// composite: required to be the target of tsconfig.json's `references` (which is what makes
|
|
// editors check these files under THIS config instead of an inferred one). A composite project
|
|
// may not disable emit (TS6310), so it emits declarations only, into node_modules — nothing
|
|
// lands in the repo and nothing reaches the bundle. Hence `tsc -p` without --noEmit below.
|
|
"composite": true,
|
|
"declaration": true,
|
|
"emitDeclarationOnly": true,
|
|
"outDir": "./node_modules/.tmp/tsconfig-node",
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig-node/.tsbuildinfo",
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2022"],
|
|
"types": ["node"],
|
|
"strict": true,
|
|
"skipLibCheck": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"resolveJsonModule": true,
|
|
// The build-tool configs include two hand-written .js files (tailwind/postcss). checkJs runs
|
|
// the type checker over them via their `@type` JSDoc, so a bad tailwind/postcss option is
|
|
// caught by the gate instead of silently mis-building CSS. Was the last hole in C-4.5.
|
|
"allowJs": true,
|
|
"checkJs": true
|
|
},
|
|
"include": ["vite.config.ts", "vitest.config.ts", "tailwind.config.js", "postcss.config.js"]
|
|
}
|