Problem
Nothing in this repo is type-checked, and the obvious command silently checks nothing.
tsconfig.json is a solution-style config — "files": [] plus references to tsconfig.app.json and tsconfig.node.json. So:
$ npx tsc --noEmit --listFiles | wc -l
0
That command exits 0 having checked zero files. The command that actually works is tsc -b --noEmit, which follows the project references:
$ npx tsc -b --noEmit | grep -c "error TS"
214
There is also no typecheck script in package.json, and vite build strips types without checking them. The only type enforcement today is ESLint's type-aware rules (@typescript-eslint/no-unsafe-* and friends), which catch a useful subset but not assignability.
This is easy to be fooled by: tsc --noEmit is what most people reach for, it prints nothing, and that reads as success.
Current state
214 errors, roughly two-thirds in test files:
in test files 143
in source files 69
Concentrated rather than spread — the top offender alone is 75:
75 src/utils/searchUtils.test.tsx
18 src/components/Badge.test.tsx
17 src/components/PathwayCard.test.tsx
15 src/components/BadgeArray.test.tsx
11 src/components/PathwayCard.tsx
10 src/components/MultiLineChart.tsx
Common shapes: fixtures that predate the v2 schema and are missing required fields, import ... assert instead of with, and computed variant/className lists widening to string.
There is already a branch for this
origin/typecheck (4 months old, 12 commits) adds exactly the missing pieces:
- a
typecheck script (tsc -b) in package.json
- a
typecheck step in .github/workflows/node-lint.yml
typecheck as a required check in .github/rulesets/gitflow-main.json and gitflow-production.json
It has no PR and is mostly Merge branch 'main' into typecheck commits, which reads like it was kept alive but never landed — presumably because turning the check on fails immediately against a few hundred errors.
Suggested approach
- Land the tooling from
origin/typecheck but non-blocking at first (report, don't fail), so the number is visible and can't grow unnoticed.
- Burn it down in slices — the four test files above are ~125 of the 214, and most look like stale fixtures rather than real defects.
- Flip it to a required check once it reaches zero.
Fixing the tsconfig.json trap is worth doing regardless of the rest: either give the root config an include, or document that tsc -b is the real command.
Context
Found while working on #872 / PR #946, where I reported "typecheck clean" several times on the strength of a command that was checking nothing. Two genuine type errors in that PR's own new code were only caught once tsc -b was run. PR #946 also reduced the count from 251 to 214 as a side effect of fixing a props type that made all four BadgeArray callers fail.
Problem
Nothing in this repo is type-checked, and the obvious command silently checks nothing.
tsconfig.jsonis a solution-style config —"files": []plusreferencestotsconfig.app.jsonandtsconfig.node.json. So:That command exits 0 having checked zero files. The command that actually works is
tsc -b --noEmit, which follows the project references:There is also no
typecheckscript inpackage.json, andvite buildstrips types without checking them. The only type enforcement today is ESLint's type-aware rules (@typescript-eslint/no-unsafe-*and friends), which catch a useful subset but not assignability.This is easy to be fooled by:
tsc --noEmitis what most people reach for, it prints nothing, and that reads as success.Current state
214 errors, roughly two-thirds in test files:
Concentrated rather than spread — the top offender alone is 75:
Common shapes: fixtures that predate the v2 schema and are missing required fields,
import ... assertinstead ofwith, and computed variant/classNamelists widening tostring.There is already a branch for this
origin/typecheck(4 months old, 12 commits) adds exactly the missing pieces:typecheckscript (tsc -b) inpackage.jsontypecheckstep in.github/workflows/node-lint.ymltypecheckas a required check in.github/rulesets/gitflow-main.jsonandgitflow-production.jsonIt has no PR and is mostly
Merge branch 'main' into typecheckcommits, which reads like it was kept alive but never landed — presumably because turning the check on fails immediately against a few hundred errors.Suggested approach
origin/typecheckbut non-blocking at first (report, don't fail), so the number is visible and can't grow unnoticed.Fixing the
tsconfig.jsontrap is worth doing regardless of the rest: either give the root config aninclude, or document thattsc -bis the real command.Context
Found while working on #872 / PR #946, where I reported "typecheck clean" several times on the strength of a command that was checking nothing. Two genuine type errors in that PR's own new code were only caught once
tsc -bwas run. PR #946 also reduced the count from 251 to 214 as a side effect of fixing a props type that made all fourBadgeArraycallers fail.