Files
siftlode/frontend/knip.jsonc
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

21 lines
841 B
JSON

{
"$schema": "https://unpkg.com/knip@6/schema.json",
// `--production` (E32) asks a second question besides "is this used?": "is it used by the code
// that SHIPS?" — an export only a test reaches is either dead in the bundle or exported for its
// test, which then says so with a JSDoc `@internal` tag (knip skips those in production mode).
// What is not production code at all is excluded from the production project with a `!…!`
// pattern: the test kits, the e2e suite, and the two build-tooling modules the vite config
// imports (they shape the bundle but are not in it).
"project": [
"**/*.{ts,tsx,js}!",
"!**/*.testkit.ts!",
"!e2e/**!",
"!reactPlugin.ts!",
"!devOnlyGuard.ts!",
],
"playwright": {
"config": ["playwright.config.ts"],
"entry": ["e2e/**/*.@(spec|setup).ts"],
},
}