Skip to content

Conversation

rpl
Copy link
Member

@rpl rpl commented Oct 8, 2020

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:

  • There is technically an ignore config property that prevents eslint from loading .eslintignore files, but setting ignore to false has the side effect of ignoring the ignorePatterns config (which we need to use to make sure that we don't ignore node_modules/ and any dotted file)
  • It would be nice to move the 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

@rpl rpl requested a review from willdurand October 8, 2020 19:03
@rpl rpl marked this pull request as draft October 8, 2020 19:18
@rpl rpl force-pushed the fix/ignore-eslintignore-file branch from 8a3319e to c5b4aca Compare October 8, 2020 21:45
@rpl rpl marked this pull request as ready for review October 8, 2020 21:53
@rpl rpl merged commit be94690 into mozilla:master Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify relation to eslint, .eslintignore
2 participants