Explore ESLint's new Languages API #11390
SukkaW
started this conversation in
Technical Discussions
Replies: 1 comment 1 reply
-
Nope we will not. If we don't produce an ESTree AST then all the existing core lint rules will not work with TS code and we would have to rewrite them all from scratch. Which would obviously be a massive maintenance cost. Ultimately the cost of the conversion is small and barely a blip in the grand scale of an entire lint run. Doubly true if you do type-aware linting. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Internally,
typescript-eslint
converts TypeScript AST into ESTree-like AST for ESLint.With ESLint 9.6.0+ introducing the new ESLint Languages API, it is now possible to register a new language with ESLint, which ESLint will then consume the custom AST structure and make it available for the custom rules.
Will
typescript-eslint
follow this route in the future? Will using ESLint's Languages API eliminate the overhead of the AST conversion?Additional Info
https://eslint.org/docs/latest/extend/languages
Before you submit your discussion, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
Beta Was this translation helpful? Give feedback.
All reactions