How are you handling typed linting while the TypeScript 7 API catches up?

0
5
Asked By MellowCedar42 On

TypeScript 7 shipped as the Go-based compiler and is advertised as roughly 10× faster, but version 7.0 does not yet provide the programmatic API that typed linting tools need. For now, typescript-eslint can use the compatibility package that provides the TypeScript 6 executable and API, while a new API is expected in 7.1.

That leaves typed linting on the older checker even though builds are much faster. Biome can run some type-aware rules without loading the TypeScript compiler, although its inference-based approach is approximate and still requires scanning the whole project. Oxlint is another option and reportedly uses the faster compiler path for more complete type-aware checking.

My repository currently runs linting, typechecking in CI, and an automated review pass, but I do not know which layer is responsible for most of the work. What are people doing in the meantime: pinning the TypeScript 6 API to keep typed rules, using Biome or another linter for a partial check, switching to Oxlint, or simply waiting for the TypeScript 7 API?

5 Answers

Answered By CopperLark20 On

A compatibility bridge may help in selected projects, but pinning the TypeScript 6 API is still the least surprising option until the 7.x API and its checker behavior settle. A faster compiler is great, but changes in inference can make typed rules report different results even when the source code has not changed.

Answered By BaselineFox6 On

The useful preparation may be to capture a baseline instead of only waiting for the API. Save the complete typed-lint findings from the current checker, including file, rule, and line number. When the new API arrives, diff the results so you can tell whether new warnings come from real code problems or changed inference. Updating the compiler and changing lint rules in separate commits will make that comparison much easier.

Answered By NorthWisp53 On

Biome can be a reasonable fast-on-save layer for the rules it supports, but its type-aware domain is not free: it scans the project and enables its inference engine. I’d treat those results as a useful early signal rather than a full replacement for compiler-backed checking, especially for rules where missing cases matter.

Answered By SwiftMarble88 On

Oxlint is worth evaluating if you need faster type-aware checks now. One migration reportedly cut linting from about 30 seconds to 2 seconds, while still aiming for coverage closer to typescript-eslint than Biome’s approximate inference rules. Check its file-filter and wildcard behavior carefully, though; some patterns are not recursive in the way you might expect.

PlainRiver31 -

The migration was smooth overall, but the filtering differences were the main surprise. I’d verify include and exclude patterns before switching a large repository.

Answered By QuietOrbit7 On

I’m waiting for the official API rather than changing the toolchain twice. I upgraded briefly, realized the compatibility issue, and went back to the 6.x API until the TypeScript 7 integration is stable.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.