chore(ts-migration): make the tsconfig root set authoritative
Phase 12 prerequisite. `exclude` still carried `src/components/ui`, `src/api` and `src/lib` from `jsconfig.json`; each was meant to come off as its tree was converted, in Phases 4, 5 and 6, and all three were missed. The miss was quiet by construction. Excluding a file only keeps it out of the ROOT set — anything an included file imports is pulled in anyway — so 318 of 321 files were being checked regardless, and the omission cost nothing visible. The three that were not checked are the ones nothing under `src` imports: `api/seed.ts`, `api/attendanceSeed.ts` and `lib/skills/positionFlow.ts`. They are not dead code. `scripts/` loads them, `seed.ts` from six separate places, and they held four real errors that no previous count in this migration has included. All four were one cause. `MODULE_TABLE` is 36 rows of mixed literals, so it infers as an array of the UNION of its column types and destructuring a row gives every field `string | number | string[]` — `SKILL_CATEGORY[skill_id]` then refuses a key that might be an array. It is now written as the tuple it is. The migration plan predicted this class of error for three other tables by name. Doing this before the ratchet rather than after: a strictness flag measured against an incomplete root set produces a number that grows again later for reasons unrelated to the flag, and the whole method here is that each step's error count means one thing. root set 321 files, was 318 typecheck 0 errors, with every file in src now checked lint exit 0 npm test 1684/1691, the same 7 failures build exit 0, identical bundle hash 74d17e2d… seed.ts emitted JS identical `allowJs`, `checkJs` and `jsconfig.json` are deliberately left alone — they come off at final cleanup, after strictness. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HBG1wnuRfJKCstGB8Fekr8
This commit is contained in:
@@ -71,14 +71,19 @@
|
||||
|
||||
"include": ["src/**/*"],
|
||||
|
||||
/* Unchanged from jsconfig, and temporary. These three trees hold the densest
|
||||
logic in the app — the transport layer, every hook, and the vendored UI
|
||||
primitives — and none of it has ever been checked. Each exclusion is
|
||||
removed by the phase that converts the tree behind it, so the error count
|
||||
rises deliberately and in one identifiable place at a time.
|
||||
/* `src/components/ui`, `src/api` and `src/lib` used to be listed here, from
|
||||
jsconfig, and each was meant to come off as its tree was converted. They
|
||||
were missed, and the miss was quiet by construction: excluding a file only
|
||||
keeps it out of the ROOT set, and anything an included file imports is
|
||||
pulled in anyway, so 318 of the 321 files were being checked regardless.
|
||||
|
||||
Note that excluding a file only keeps it out of the root set: one that an
|
||||
included file imports is still checked, which is why errors from `src/api`
|
||||
and `src/lib` already show up today. */
|
||||
"exclude": ["node_modules", "dist", "src/components/ui", "src/api", "src/lib"]
|
||||
The three that were not are the ones nothing under `src` imports —
|
||||
`api/seed.ts`, `api/attendanceSeed.ts` and `lib/skills/positionFlow.ts`.
|
||||
They are not dead: `scripts/` loads them, `seed.ts` from six places. They
|
||||
were simply invisible to `tsc`, and held four real errors.
|
||||
|
||||
Removed before the strictness ratchet rather than after, because a flag
|
||||
measured against an incomplete root set gives a number that grows again
|
||||
later for reasons that have nothing to do with the flag. */
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user