Skip to content

Nothing is type-checked in CI, and tsc --noEmit silently checks zero files #948

Description

@jacobvjk

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

  1. 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.
  2. 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.
  3. 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.

Activity

  1. AlexAxthelm commented on Sep 21, 2026

    @AlexAxthelm
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions