The plugin does a good job of working up the tree to find the most local configuration file, but it doesn't do the same with .eslintignore files.
Consider the project layout:
inner/
.eslintignore
.eslintrc.json
test.js
.eslintignore
.eslintrc.json
test.js
Root directory files
/.eslintrc.json
{
"rules": {
"eqeqeq": [ "error", "always" ]
}
}
/.eslintignore
/test.js
if (0 == 1) console.log('what?!');
/inner files
/inner/.eslintrc.json
{
"rules": {
"eqeqeq": ["warn", "always"]
}
}
/inner/.eslintignore
/inner.test.js
if (0 == 1) console.log('what?!');
If you remove the .eslintignore files, you will correctly get an error in /test.js and a warning in /inner/test.js.
If you add just the /.eslintignore file, it ignores the inner folder. I think the expected behavior would be to reset the "ignore" blobs at the same root as the .eslintrc.json file is found. That's what I had expected anyway.
So I added the /inner/.eslintignore file and it does not override the root ignore blobs. This still produces no warning in the /inner/test.js file.
The plugin does a good job of working up the tree to find the most local configuration file, but it doesn't do the same with
.eslintignorefiles.Consider the project layout:
Root directory files
/.eslintrc.json
{ "rules": { "eqeqeq": [ "error", "always" ] } }/.eslintignore
inner/*/test.js
/inner files
/inner/.eslintrc.json
{ "rules": { "eqeqeq": ["warn", "always"] } }/inner/.eslintignore
!test.js/inner.test.js
If you remove the
.eslintignorefiles, you will correctly get an error in/test.jsand a warning in/inner/test.js.If you add just the
/.eslintignorefile, it ignores the inner folder. I think the expected behavior would be to reset the "ignore" blobs at the same root as the.eslintrc.jsonfile is found. That's what I had expected anyway.So I added the
/inner/.eslintignorefile and it does not override the root ignore blobs. This still produces no warning in the/inner/test.jsfile.