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.

Adding ignore-path flag referencing a file in node_modules not respecting ignore config

See original GitHub issue

Tell us about your environment

  • ESLint Version: 4.6.1 (latest)
  • Node Version: 8.4.0 (latest)
  • npm Version: 5.4.0 (latest)

What parser (default, Babel-ESLint, etc.) are you using? N/A

Please show your full configuration: N/A

Configuration
{}

What did you do? Please include the actual source code causing the issue.

eslint --ignore-path node_modules/kcd-scripts/dist/config/eslintignore .

What did you expect to happen?

I expected the eslintignore to be applied

What actually happened? Please include the actual, raw output from ESLint.

It is not. I get an error indicating that eslint is processing files in node_modules.

Here’s the contents of node_modules/kcd-scripts/dist/config/eslintignore:

node_modules
coverage
dist
build
out
.next

I think that the docs indicate that the patterns here will be relative to the .eslintignore file, so I changed the eslintignore file to various patterns (including ../../../node_modules/, **/node_modules/**). None of those combinations seemed to work. I think there may be a bug here, but I’m uncertain… Happy to dig in more if someone can tell me I’m not missing something obvious.

To reproduce: https://github.com/kentcdodds/eslint-config-issue

Install deps and run npm run broken and npm run working.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
not-an-aardvarkcommented, Jul 21, 2018

Working on this.

1reaction
kentcdoddscommented, Jul 26, 2018

Thank you! 👏

Read more comments on GitHub >

github_iconTop Results From Across the Web

"exclude" property of tsconfig.json is not being respected
In a similar vein I was having issues with node_modules exclusion. Here's a heavy handed solution, that ignores all *.d.ts files. I added...
Read more >
Git ignore node modules - Simple Solution and Common ...
Add the following line to your .gitignore file node_modules. It will match the node_modules directory anywhere in your git repository.
Read more >
Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >
config | npm Docs
Putting --foo bar on the command line sets the foo configuration parameter to "bar" . A -- argument tells the cli parser to...
Read more >
Configuring Jest
The directory where Jest should output its coverage files. coveragePathIgnorePatterns [array<string>]​. Default: ["/node_modules/"]. An array of ...
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