chore: resolve low-hanging web-ext warnings #1987
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.
Description
Resolves the following web-ext warnings:
data_collection_permissionsis easy to add; we don't collect any data. We don't even store the user's blogname for Quick Reblog's "Remember the last selected blog in the popup" option, we store a hash of it.Resolving the AccessKit, No Recommended, and Tweaks warnings is also trivial; we just need to use
browser.runtime.getURLto sanitise the argument toimport()(which also requires using an absolute path). It's the tiniest bit messier than using unsanitised relative paths, but resolving six warnings fromnpm testseems worth it to me.The remaining warnings are:
I think it's safe to say that these cannot be resolved—there is no sanitiser which
addons-linterwould be satisfied with and which is usable in a main world script, and we can't do anything about the warnings coming from jQuery unless we completely ditch jQuery......which we could do if we really wanted to, since we don't use it for much...
...but that's for another day, or at the very least another PR!
Testing steps