Skip to content

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

@kentcdodds

Description

@kentcdodds

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!

Metadata

Metadata

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlycoreRelates to ESLint's core APIs and features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions