docs: add schema validation for manifest json files#22517
docs: add schema validation for manifest json files#22517HowardBraham merged 2 commits intodevelopfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
7f4eb2e to
ab8eb15
Compare
| "javascript.preferences.importModuleSpecifier": "relative", | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": ["app/manifest/*/*.json"], |
There was a problem hiding this comment.
Should we restrict this just to the "base" and "chrome" manifests? It looks like this schema was just written for the Chrome extension manifest, not for Firefox.
Though the schema does seem to allow extra properties, so maybe it works adequately well for Firefox as well 🤔 Offhand I'm not aware of them using the same property for different things.
There was a problem hiding this comment.
Doesn't matter which way to me, though it is useful in the partial manifest files too, I think.
There was a problem hiding this comment.
OK, we can try applying to both, and restrict it just to Chrome+base if it causes issues.
I've tested it out, and it looks like there are no errors with the Firefox manifest. Just a few Firefox-specific keys that are missing from the schema.
Builds ready [7ee9eb3]
Page Load Metrics (1102 ± 87 ms)
Bundle size diffs
|
Description
Adds schema validation for manifest.json files for VSCode users.
This PR adds tooltip documentation showing what manifest.json keys do:
And shows errors when values are used that aren't permitted by the schema:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist