[Feature Request] Allow specifying parser per file extension
See original GitHub issueTell us about your environment
- ESLint Version:
^3.x.x
- Node Version: latest
- npm Version: latest
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
& typescript-eslint
Proposal It would be beneficial to include the ability for eslint to determine which parser to use based on file extension so that eslint can be run against a multi-language codebase in a single pass. By extension this would also benefit text editors that can’t currently specify multiple configs so that a single config can be used to check the entire project.
Right now, I am running eslint once for JS(X), and again for Typescript each using a different parser since the ts-parser doesn’t support most stage-X ecma features and the babel-parser doesn’t support TS syntax.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (7 by maintainers)
Top Results From Across the Web
[Feature Request] Parse content & Extract Pages based on ...
I want to know every "Supplier" & "Products" & "Contact" in the PDF file. ... *Adding RegEx support would allow the user to...
Read more >File type associations | IntelliJ IDEA Documentation - JetBrains
Configure the IDE to recognize different file types and open files of certain types in IntelliJ IDEA by default.
Read more >argparse — Parser for command-line options, arguments and ...
ArgumentParser parses arguments through the parse_args() method. This will inspect the command line, convert each argument to the appropriate type and then ...
Read more >Configuring ESLint - ESLint - Pluggable JavaScript Linter
Configuration Comments - use JavaScript comments to embed configuration information directly into a file. · Configuration Files - use a JavaScript, JSON, or...
Read more >babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel ... Setting this option to true allows them anywhere where a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This does seem useful to me now that we’re actively supporting more parsers (TypeScript, Babel, and now Vue!).
One idea: the
parser
option could accept an object that maps the parser to a filetype and its parser options:Curious what other team members think!
Great. Now I know how to deprecate an npm package.