Set ignore path in .eslintrc
See original GitHub issueThe ESLint docs show an example of how to use .gitignore
as the ignore path.
This seems a very useful feature to me. However, my editors don’t support this.
It would be useful to specify the ignore-path in .eslintrc
instead of as a command line parameter. This way editors or whatever tools using ESLint don’t have to supply this.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:17
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Ignoring Code - ESLint - Pluggable JavaScript Linter
You can tell ESLint to ignore specific files and directories using ignorePatterns in your config files. ignorePatterns patterns follow the same rules as...
Read more >Disable eslint rules for folder - Stack Overflow
To ignore some folder from eslint rules we could create the file .eslintignore in root directory and add there the path to the...
Read more >ESLint Ignore Multiple Paths for All Rules (or One Rule!)
If I want all rules to be disabled for one or many folders and files, I can add the paths to my .eslintignore...
Read more >How to disable ESLint for some lines, files or folders
Ignore multiple files or folders ... To turn off ESLint in the whole file, you can add /* eslint-disable */ in the first...
Read more >Command Line Interface - ESLint
This option prevents inline comments like /*eslint-disable*/ or /*global foo*/ from having any effect. This allows you to set an ESLint config without...
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
You can set
ignorePath
within stylelint config. They went to the trouble to switch to node-ignore to facilitate pointingignorePath
to .gitignore.As time goes on we find ourselves linting all the things. Having separate .gitignore, .eslintignore, .stylelintignore, etc. files that contain the same rules is tedious. Junior devs generally know to update .gitignore when messing with the project but always forget the separate linting configs.
It would be awesome if eslint supported setting
ignorePath
in config and not just via CLI, then 3 files would become one. The growing number of config files floating around our project roots is tiresome, internally we have a policy of consolidating all config possible in package.json.The only thing preventing the dream of all linting config in package.json, all referencing .gitignore is this issue 😢
@nzakas This should be re-opened. Multiple config files is not right.
BTW, referencing .gitignore does not solve it. You might have bundled dependencies to be commited to Git that are not to be linted.