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.

"eslint --ignore-path" should accept multiple file paths

See original GitHub issue

Current, eslint --ignore-path accept only one ignore file, it is useful if .gitignore and .eslintignore could be used together.

As of ESLint v4.14.0, --ignore-path command line argument is accepting path::String, is is proposed to change to [path::String], so addition files could be included.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:21
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

14reactions
edelecommented, Jun 26, 2018

Here is an actual usecase.

I want eslint to only check files I can modify so I do --ignore-path .gitignore. But additionally I don’t want eslint to check my flow-typed annotations.

The only way I can do this now is to copy everything from .gitignore to .eslintignore and add flow-typed/* there. But then I have to always add lines to .gitignore and .eslintignore every time I want to ignore something.

This is kinda minor but I would love to know about a better way

5reactions
graingertcommented, Jan 17, 2018

@ilyavolodin .gitignore + .eslintignore is a really common case. I’ve got a vendor directory in source control and I want to ignore my /build directories etc.

Currently both ignore files are in the root of the repo so it’s less important that relative paths are preserved.

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 >
ESLint Ignore Multiple Paths for All Rules (or One Rule!)
Simply place the . eslintignore file in the project root folder. There is no additional configuration needed.
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 | WebStorm Documentation - JetBrains
First it looks for a directory closest to the linted file which contains a .eslintignore or .eslintrc.* file, or a package.json file with ......
Read more >
CLI - Prettier
Given a list of paths/patterns, the Prettier CLI first treats every entry in it as a literal path. ... Prettier CLI will ignore...
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