-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linter should report wrong min version for APIs usage, based on mdn/browser-compat-data #1493
Comments
I think this is a great idea, we already have our linter use the official schema for validation but that schema is not yet versioned so either we start versioning the schema and report based on that or indeed use mdn/browser-compat-data which seems quite extensive. I don't know if the browser-compat-data contains all APIs though, maybe @andymckay knows how that's maintained? |
Note to myself: https://github.com/mdn/browser-compat-data#installation - browser-compat-data is available as an npm package which should make things easier. |
…ersion (#1493) (#2290) Fixes #1493 This is a first attempt at integrating the browser-compat-data from the MDN compatibility tables with the linter. It currently checks for manifest keys, permissions and APIs to be supported by the given `strict_min_version` in the manifest for both Firefox and Firefox for Android. All produced messages are warnings. However, no warning is shown if Firefox or Firefox for Android do not implement an API and that is documented in the compat data. This is to avoid a lot of Firefox for Android spam, plus the totally unsupported APIs should be caught by the schemas. I'm not quite happy with the amount of duplication of logic, even though it's subtly different for all cases, so improvement suggestions welcome! Further I'll happily add more tests, these are just the ones I could come up with.
Describe the problem and steps to reproduce it:
e.g. M-Reimer/undoclosetab#9
What happened?
No errors or warnings reported.
What did you expect to happen?
Based on https://github.com/mdn/browser-compat-data/tree/master/webextensions, check for possible errors and report in amo validator and
web-ext lint
.The text was updated successfully, but these errors were encountered: