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
4.2 KiB
4.2 KiB