I’ve been wrestling with writing an extension and I think a linter/validator of some sort could be quite helpful when developing a browser extension.
If it finds errors it could point to relevant documentation.
It could check things in
- required fields
- disallowed fields
- invalid values for matches for example
- not requiring remote files (JS on CDNs for example)
- when declaring a local resource: checking that it’s actually there
For content scripts:
- not using browser extension APIs that are not available in content scripts
For background scripts:
- making sure (somehow) that the code is (more) async
I searched but couldn’t find anything like this. Does anyone know of something like this existing?
Wrt creating such a tool, I’m thinking JS is probably a good candidate to create it as I assume a lot of people that want to create extensions have npm installed, right?
Any feedback: please