Files
siftlode/frontend/tsconfig.node.json
T
peter 7ed2ac4e95 build(frontend): knip also checks what ships; strict indexing in every project
`npm run knip` now runs a second, --production pass, which asks whether the
code that ships uses an export, not just whether anything does. Of the 47
exports only tests reached:
- 34 are exported for their test and say so with @internal, naming the test.
- 11 were module-private names with a stray `export`. Two of them were not
  used at all and are deleted.
- The unused alreadyReported re-export is gone.
Test kits, the e2e suite and the two build-tooling modules are excluded from
the production project, each named in knip.jsonc.

noUncheckedIndexedAccess is now on for the node and e2e tsconfigs too (0
errors), matching the app project. tsconfig.node.json listed a
tailwind.config.js that has not existed since Tailwind 4. That entry is now
playwright.config.ts, which the typed lint finds through this project.
2026-10-03 16:44:28 +02:00

50 lines
2.4 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,
// E32: an index read is `T | undefined` here, as it really is (0 errors when switched on).
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
// The build-tool configs include a hand-written .js file (postcss; tailwind 4 needs no config
// file, and the stale `tailwind.config.js` entry pointed at nothing until E32). checkJs runs
// the type checker over it via its `@type` JSDoc, so a bad option is caught by the gate instead
// of silently mis-building CSS. Was the last hole in C-4.5.
"allowJs": true,
"checkJs": true
},
// reactPlugin.ts is the ONE React transform both configs import (E27 S1) — it is build tooling,
// not app source, so it belongs here and not under tsconfig.json's ["src"]. A file imported by a
// listed one but absent from `include` is TS6307, not a silent pass. playwright.config.ts is
// here as well as in e2e/tsconfig.json because eslint's typed rules (E32) find a file's project
// through tsconfig.json's `references`, which name this project and not the e2e one.
"include": [
"vite.config.ts",
"vitest.config.ts",
"reactPlugin.ts",
"devOnlyGuard.ts",
"playwright.config.ts",
"postcss.config.js"
]
}