Recommended abstract syntax tree for JavaScript/TypeScript

For context, I'm trying to create a Eslint plugin to detect JavaScript runtime compatibility issues. So I need to keep track of variable types - a bit like how TypeScript keeps track of types. I find the way Eslint exposes the AST to be quite limiting.
3 Replies
Neto
Neto2mo ago
Neto
Neto2mo ago
select javascript and pick a parser
No description
Mango Juicy
Mango JuicyOP2mo ago
I mentioned JavaScript AST was too limiting. Eslint uses Espree AST, which is based off Acorn AST. The main goal is to extract Nodejs types for detection. JavaScript ASTs don't appear to provide type info, so you may have to write some crazy ass algorithm to detect types. Found a possible answer from Solidjs channel: Use typescript-eslint plugin to extract types.
Want results from more Discord servers?
Add your server