fix: .eslintignore files should be ignored #3390
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
addons-linter shouldn't load the .eslintignore file that may be available in the current working dir.
The strategy used in this PR to make sure that addons-linter's eslint-based javascript scanner doesn't load any .eslintignore file is to configure eslint to use a custom .eslintignore file included in the addons-linter npm package.
Other side notes about the other approaches evaluated:
ignore
config property that prevents eslint from loading .eslintignore files, but settingignore
tofalse
has the side effect of ignoring theignorePatterns
config (which we need to use to make sure that we don't ignorenode_modules/
and any dotted file)ignorePatterns
config into the custom eslintignore file used in this pull request, but the test related to that behaviors are failing (I didn't really looked into why yet, it may be an issue specific to the test case, we may want to double-check that as a follow up)Fixes #3389