question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set ignore path in .eslintrc

See original GitHub issue

The 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:closed
  • Created 8 years ago
  • Reactions:17
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

40reactions
jaydensericcommented, Aug 24, 2016

You can set ignorePath within stylelint config. They went to the trouble to switch to node-ignore to facilitate pointing ignorePath 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 😢

9reactions
onurycommented, Dec 26, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found