Skip to content
Engineering

tsgolint Reaches v7: Type-Aware Linting at Go Speed in Oxlint

tsgolint v7 integrates Go-powered type-aware linting into Oxlint, enhancing TypeScript linting speed and coverage.

Topic
Engineering
Reading time
5 min
Length
1,037 words
Published
Sep 14, 2026
03:36 pm IST
In this article
  1. What Changed with tsgolint v7
  2. Why It Matters for Production Codebases
  3. Implementing tsgolint v7 in Your Workflow
  4. Migration from ESLint
  5. Limitations and Considerations
  6. Frequently Asked Questions

The release of tsgolint v7 marks a significant update in TypeScript linting, bringing native Go speed to the type-aware lint rules utilized in Oxlint. This integration allows for enhanced linting performance, making it a notable development for teams working extensively with TypeScript.

What Changed with tsgolint v7

tsgolint now operates as the type-aware linting engine within Oxlint, reaching its stable v7 release. This version incorporates the typescript-go compiler, which is the official Go port of the TypeScript compiler, enabling real-time TypeScript program builds. Oxlint, crafted in Rust, handles tasks such as file discovery, configuration, and syntactic rules, while the more complex type-aware tasks are passed to the Go binary. The Go-based engine then returns structured diagnostics, making the linting process both efficient and comprehensive.

The update tracks TypeScript v7.0.2 and supports 59 out of the 61 type-aware rules from typescript-eslint, a jump from 43 rules supported back in December when it was still in alpha. This improvement in rule coverage directly impacts the robustness of the linting process, ensuring more thorough code analysis. Specifically, it allows Oxlint to catch a wider range of semantic errors, such as ensuring promises are awaited, which are crucial for maintaining robust and error-free codebases.

The integration with typescript-go means that tsgolint can leverage all future optimizations made by the TypeScript team. This aligns with the strategy of not reimplementing a type checker but instead building on top of existing, well-maintained tools. This decision ensures that as TypeScript evolves, tsgolint can quickly adapt and benefit from improvements, keeping its linting capabilities up to date with the latest language features and performance enhancements.

Why It Matters for Production Codebases

For developers maintaining production codebases, the implications of this update are substantial. Type-aware linting is a critical part of static analysis, which can identify potential bugs and enforce coding conventions before the code is run. This level of analysis requires a detailed understanding of a program's types, often beyond what a single file can provide. By leveraging Go's performance, tsgolint provides faster and more efficient linting, reducing the overhead typically associated with type-checking in TypeScript projects.

Moreover, the integration offers a significant speed advantage. According to benchmarks, tsgolint can be 12 to 18 times faster than ESLint using typescript-eslint on substantial projects like microsoft/vscode and vuejs/core on an Apple M4 Pro. This speed gain is crucial for large-scale projects where linting can become a bottleneck. In practice, this means developers can run linting more frequently, potentially integrating it into their continuous integration pipelines without significantly impacting build times.

Implementing tsgolint v7 in Your Workflow

To start using tsgolint with Oxlint, you can follow these straightforward steps:

pnpm add -D oxlint oxlint-tsgolint@7
pnpm oxlint --type-aware

The --type-aware flag enables type-aware linting, and you can also use the --type-check flag to report compiler errors alongside lint diagnostics from the same TypeScript program. These flags can be permanently set in an oxlint.config.ts or .oxlintrc.json file to streamline the configuration process.

Additionally, the release introduces per-rule timings, accessible with the oxlint --type-aware --debug timings command. This feature allows teams to identify which type-aware rules are the most time-consuming, helping optimize the linting process further. For example, if a specific rule is found to be a performance bottleneck, teams could prioritize optimizing their codebase to reduce the rule's impact, or temporarily disable it while investigating alternatives.

Migration from ESLint

For teams transitioning from ESLint, the process is facilitated by the npx @oxlint/migrate --type-aware command, which translates existing configurations based on the migrate-from-eslint guide. However, there are some caveats to consider:

  • TypeScript 7.0 or later is required for type-aware linting.
  • Some legacy tsconfig options, such as baseUrl, are not supported.
  • Projects using deprecated TypeScript 6 features must migrate first.

This migration process involves careful planning. Teams should start by auditing their current TypeScript configurations and dependencies to ensure compatibility with TypeScript 7.0. Once identified, necessary updates or refactors should be prioritized to align with the new requirements.

Limitations and Considerations

While tsgolint v7 offers numerous benefits, there are still areas that require attention. The typescript-eslint team, whose contributor auvred developed the original tsgolint prototype, regards its own fork as experimental and not under active development. This might influence organizations that rely heavily on specific typescript-eslint features not yet covered by tsgolint.

Moreover, the oxc side is still refining correctness, with ongoing user-reported issues, such as autofixes that inadvertently remove necessary type assertions. These are critical areas to monitor if consistency and correctness are paramount in your projects. Teams may need to perform additional testing or manually review autofixes to ensure they do not introduce errors.

In addition, the migration demands can pose challenges. Ensuring compatibility with TypeScript 7.0 and updating configurations might require additional effort, especially for large, legacy codebases. Projects deeply integrated with existing tooling might need to consider the full scope of changes and potential disruptions before committing to the transition.

Another consideration is the alignment with tsgo. While this alignment promises future optimizations from the TypeScript team, it also means that any breaking changes or updates in TypeScript will directly affect tsgolint. Teams must stay informed about TypeScript's roadmap and prepare to adapt their linting strategies accordingly.

Furthermore, while tsgolint covers 59 out of the 61 type-aware rules, there are still two rules from typescript-eslint that are not yet supported. Teams relying on those specific rules will need to consider whether the current rule coverage is sufficient for their needs or if they should wait for future releases that might include those rules.

Frequently Asked Questions

  • What is the main advantage of using tsgolint with Oxlint?
    tsgolint provides type-aware linting with Go's speed, improving performance and coverage over traditional ESLint setups.
  • Are there any drawbacks to migrating to tsgolint v7?
    Compatibility with TypeScript 7.0 is required, and some legacy configurations are not supported, which might require additional migration efforts.
  • How does tsgolint v7 handle type-aware linting differently?
    It uses the typescript-go compiler for real-time program builds, enhancing speed and diagnostic capabilities.
  • Is Oxlint suitable for all TypeScript projects?
    While advantageous for many projects, those heavily dependent on specific typescript-eslint features might need to evaluate coverage before migrating.
  • How can teams optimize their use of tsgolint?
    Teams can utilize the per-rule timings feature to identify and address performance bottlenecks within their linting processes.

Sources

tsgolint Reaches Stable v7, Bringing Go-Powered Type-Aware Linting to Oxlint

Every claim above was checked against this source before publishing. The analysis, the code and the opinions are mine.

Frequently asked

What is the main advantage of using tsgolint with Oxlint?

tsgolint provides type-aware linting with Go's speed, improving performance and coverage over traditional ESLint setups.

Are there any drawbacks to migrating to tsgolint v7?

Compatibility with TypeScript 7.0 is required, and some legacy configurations are not supported, which might require additional migration efforts.

How does tsgolint v7 handle type-aware linting differently?

It uses the typescript-go compiler for real-time program builds, enhancing speed and diagnostic capabilities.

Is Oxlint suitable for all TypeScript projects?

While advantageous for many projects, those heavily dependent on specific typescript-eslint features might need to evaluate coverage before migrating.

Deepak Kumar

Written by

Deepak Kumar

Sr Software Engineer at India Today Group | Aaj Tak · MERN Stack · Generative AI

I build production web applications and Generative AI systems, and I have spent most of nine years on the maintenance end of other people's architectural decisions. I write here about what those systems actually do once real traffic hits them.

Message me