Skip to content

Catch more with static checks: type-aware oxlint, oxfmt, knip - #8

Merged
donnes merged 1 commit into
mainfrom
tooling
Oct 22, 2026
Merged

donnes merged 1 commit into
mainfrom
tooling

Conversation

@donnes

@donnes donnes commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Problem

Tests are the most expensive check to run in CI, and the static checks weren't pulling their weight. Biome's lint has no type information, so it can't see promise bugs or non-exhaustive switches; nothing caught unused code; and some test assertions were tied to log formatting instead of behavior. One real gap: no test checked that status (a dry run) never writes. The suite still passed with the dry-run guard removed from Files.link().

Solution

  • oxlint with type-aware rules (tsgolint) and oxfmt replace Biome, as in T3 Code. Notable rules: no-floating-promises, no-misused-promises, switch-exhaustiveness-check, no-unnecessary-condition, no-unsafe-type-assertion, import/no-cycle, import/no-commonjs.
  • knip for unused files, exports and dependencies. It found six unused exports, now removed.
  • Stricter tsconfig: no unused locals or parameters, no implicit returns, no unreachable code.
  • CI: one fast job (format, lint, typecheck, knip, build, a smoke run of the bundle). Tests on Linux and macOS start only after it passes, and superseded runs are cancelled.
  • Test audit: all 8 tests guard real regressions and the suite runs in about 1s, so none were removed. Assertions now check filesystem state and status --json instead of log text, incidental checks are gone, and the skills test now asserts that status creates nothing.

Stacked on #7.

Verification

  • bun run check passes.
  • A probe file with a floating promise is rejected by lint.
  • With the dry-run guard removed from link(), the old suite passes 8/8 and the new suite fails.

🤖 Generated with Claude Code

Replace Biome with oxlint (type-aware via tsgolint) and oxfmt, as in T3
Code, and add knip. The type-aware rules catch floating or misused
promises, non-exhaustive switches, unnecessary conditions and unsafe
casts; knip catches unused files, exports and dependencies (it found six
unused exports). tsconfig also rejects unused locals and parameters,
implicit returns and unreachable code.

CI now runs format, lint, typecheck, knip, build and a smoke run of the
bundle in one fast job, and only then the tests on Linux and macOS.

Tests assert on filesystem state and status --json instead of log text,
drop incidental assertions, and now check that status never writes: the
old suite still passed with the dry-run guard removed from link().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@donnes
donnes merged commit 006fa84 into main Oct 22, 2026
3 checks passed
@donnes
donnes deleted the tooling branch October 22, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant