Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

.eslintignore rules that start with ! cause nearly all files to be skipped #133

Closed
blowery opened this issue Apr 18, 2017 · 0 comments · Fixed by #139
Closed

.eslintignore rules that start with ! cause nearly all files to be skipped #133

blowery opened this issue Apr 18, 2017 · 0 comments · Fixed by #139
Assignees
Labels

Comments

@blowery
Copy link

blowery commented Apr 18, 2017

for example, an .eslintignore with:

!.eslintrc.js

will cause all files to be skipped, because minimatch sees this as a negation rule and matches all files that are not .eslintrc. The intent is the same as .gitignore, "don't skip .eslintrc.js".

Note that eslint does not use minimatch, but instead uses https://www.npmjs.com/package/ignore. See https://github.com/eslint/eslint/blob/master/lib/ignored-paths.js

@blowery blowery changed the title .eslintignore rules that start with ! cause all files to be skipped .eslintignore rules that start with ! cause nearly all files to be skipped Apr 18, 2017
@robwise robwise self-assigned this Apr 22, 2017
robwise added a commit that referenced this issue Apr 22, 2017
…lobs

Minimatch's globs behavior differs from the typical .gitignore glob behavior. This means that
certain patterns do not correctly ignore filepaths. Using node-ignore should fix this problem.

BREAKING CHANGE: Some files that were previously ignored may now no longer be ignored, and vice
versa.

Fixes #133
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants