add options for ignoring specific lints #68
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.
fixes #67
This adds two new flags in the constructor as documented (hopefully in a way that makes sense - may need rewording) in the README.
Features:
ignoreKnownChromeLintFailures
) that ignore lint failures that are raised due to differences between firefox and chrome manifest formats (see Manifest Version 3 background.Service_Worker is currently disabled mozilla/web-ext#2532 for an example). This is not a mechanism that fullly supports validating chrome extensions, but it is a way to prevent this linter from failing when given a valid chrome extensionlintWarningsAsErrors
, allowing warnings to be filtered as well if this option is trueTesting:
Tested using the build scripts of a web extension I've been working on recently that uses this plugin. Output in most scenarios (such as with and without
lintWarningsAsErrors
, valid filters, invalid filters, and handling of junk data) seems to match what would reasonably be expected.as an example:
This sample data successfully filters the error indicated by the first rule, and essentially ignores the other two. This set of filters is (currently) the same as what
ignoreKnownChromeLintFailures
would add automatically.Changes to be made:
* I would do this, but I'm skeptical that the way I set up junit in a project recently may cause other things to break. maybe
vitest
as mentioned in the linked issue works differently?