Configure file extensions in .eslintrc
See original GitHub issueAFAICT, this is not supported at the moment. Example:
- You have a Node app
- Your React components use the
.jsx
extension. - You have one
.eslintrc
at the root for Node, and nested.eslintrc
withjsx: true
.
It seems you have to run eslint . --ext .js,.jsx
which is ok, but my intent is really to scope parsing of .jsx
files to the subtree that contains them. That’s why I thought rc-level config might make sense.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:8
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Configuration Files - ESLint - Pluggable JavaScript Linter
You can put your ESLint project configuration in a configuration file. You can include built-in rules, how you want them enforced, plugins with...
Read more >Setting file extensions in ESLint configuration using overrides
I'm trying to specify the file extensions that ESLint should check by setting overrides in the configuration rather than needing to use the ......
Read more >.eslintrc without file extension is deprecated - DEV Community ...
As you may know, the ESLint officially encourages us to give an adequate file extension to .eslintrc . ESLint supports configuration files in ......
Read more >Apply different eslint sheets for different file extensions
This works perfectly from the command line but not in the IDE's editor. The IDE can only select an eslint configuration based on...
Read more >Configuration File - Prettier
Overrides let you have different configuration for certain file extensions, folders and specific files. Prettier borrows ESLint's override format. ... files is ...
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
@ljharb
Making CLI options and config options symmetric is not really a goal at the moment; there are some CLI options like
--fix
which intentionally require user opt-in.For more discussion on specifying extensions without command-line flags, see https://github.com/eslint/eslint/issues/8920.
For more discussion on statically declaring command-line flags in general, see https://github.com/eslint/eslint/issues/9484.
This is now possible (see the documentation here).