Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
typescript-estree
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
TypeScript is getting ported to Go! It's going to be 10x faster! Blazing fast! Speed! 🔥 ⚡
https://devblogs.microsoft.com/typescript/typescript-native-port/
If we could use this to power typed linting, that'd be great for users. Type checking performance isthe bottleneck for the vast majority of correctly configured lint rules that use typescript-eslint.
We believe there are currentlyat least three major difficulties with typescript-eslint using tsgo in 2025:
- ESLint does not yet support asynchronous parsers:Change Request: allow asynchronous parser eslint/eslint#15475
- It's very likely that tsgo will be consumed via native binding APIs (WASM), and so will almost certainly be asynchronous
- typescript-eslint could in theory use something like
synckit
but that presents data serialization difficulties - Edit: perEnhancement: Use TypeScript's Go port (tsgo / typescript-go) for type information #10940 (comment) andEnhancement: Use TypeScript's Go port (tsgo / typescript-go) for type information #10940 (comment), this might not be a blocker for long (thanks@jakebailey and@nicolo-ribaudo for the notes!)
- tsgo is not stable and is many months away from being stable. It won't likely be the primary stable version of TypeScript within the next ~1-2 major versions of typescript-eslint.
- ESLint rules in and out of typescript-eslint still rely on the JS-land AST, so even if we had a stable async parser, there's design work to be done communicating AST nodesand type information back from Go/WASM land to JS-land
So, although we'd very much like to be 10x faster (!!), it will take a lot of design exploration and work.
If you'd like to work on this, please go ahead. Seeing your experimentation will help inform how typescript-eslint can adopt faster typed linting in the future. 🚀
Additional Info
If you're coming here because your typed linting is slow, please go through our typed linting performance troubleshooting guide:https://typescript-eslint.io/troubleshooting/typed-linting/performance. Properly configured linting should not be significantly slower than type checking.
💖