Skip to content

Enable type-aware Oxlint rules and compiler diagnostics - #1463

Merged
skovhus merged 2 commits into
mainfrom
skovhus/type-aware-oxlint-tsc
Sep 22, 2026
Merged

skovhus merged 2 commits into
mainfrom
skovhus/type-aware-oxlint-tsc

Conversation

@skovhus

@skovhus skovhus commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Enable type-aware correctness rules and TypeScript compiler diagnostics in the shared Oxlint configuration, backed by pinned oxlint-tsgolint. Lint commands now check types, so remove the standalone typecheck script and run Vitest directly from the test commands. Verification runs Oxlint once before the build and tests. Build and watch commands retain tsc for JavaScript and declaration output.

Reference tsconfig.test.json from the root project so Oxlint discovers tests, helpers, and the Vitest config. Keep its Bundler module resolution separate from the production Node16 configs. Fix newly reported promise and string-conversion issues, preserve detached background work, and disable unbound-method only in test files where Vitest inspects mock methods.

Validation on the branch rebased onto main:

  • pnpm install --frozen-lockfile
  • pnpm verify:bail: lint, formatting, both builds, and coverage passed; 526 tests passed and 2 skipped.
  • Temporary probes confirmed type mismatches, implicit any, and floating promises are rejected in server/client source, server/client tests, nested tests, test helpers, and the Vitest config. All probes were removed.
  • Independent code review completed with no remaining findings.

Local lint/type-check benchmark (macOS arm64, Node 22.22.2, TypeScript 6.0.3): one warmup per mode and five alternating measured runs on the same checkout. The old Oxlint config plus tsc --noEmit -p tsconfig.test.json took a median 1.516s (tsc alone: 1.431s); the new type-aware Oxlint command took 0.577s. This saves about 0.94s / 62% for this step while adding type-aware lint rules. Measurements use the local executables, excluding pnpm startup, Prettier, builds, and tests. tsc still handles builds; coverage remains unchanged in this PR.

@skovhus
skovhus merged commit fb8b25e into main Sep 22, 2026
5 checks passed
@skovhus
skovhus deleted the skovhus/type-aware-oxlint-tsc branch September 22, 2026 07:57
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.

2 participants