New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser services are undocumented #8390
Parser services are undocumented #8390
Comments
@not-an-aardvark I've read through #6974 and #6975 (among other links in those threads and pr) and I don't have experience with this feature. 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. Question: |
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 |
The
parseForESLint
API from #6974 was added in #6975, but there isn't any documentation for this.The text was updated successfully, but these errors were encountered: