Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Parser services are undocumented #8390
From what I understand, the parseForESLint capabilities are meant to work with services like https://github.com/eslint/typescript-eslint-parser . By default, the parser will parse with existing configurations. If you set up your eslint configurations with "parser": "my-custom-eslint-parser", then that means"my-custom-eslint-parser" is going to create your own AST for ESLint to work with. The custom ESLint parser should reveal a function "parseForESLint" which is what the ESLint linter will use to make the AST.
Sorry about the delay -- I missed this notification and hadn't realized you replied.
Basically, a parser is a module which accepts some some source code text and returns an AST. By default, ESLint uses the espree parser to create an AST.
Parsers work by exposing a
The motivation for #6974 was that it would be useful for parsers to be able to provide additional data or functionality, beyond just an AST. For example, it would be nice if the typescript parser could provide type-checking capabilities, but that wasn't possible with the
To allow this, we now use the