[json] Override/disable json-schema for package.json
See original GitHub issueI would like to override the default json-schema used by VSCode on some files with my own json-schema (example: VSCode use a json-schema for the Node’s “package.json”, but I want to be able to override it), like when configuring any other json-schema in settings.json:
//settings.json - currently this doesn't work and VSCode keep applying the Node's package.json json-schema
"json.schemas": [{
"fileMatch": ["*/package.json"],
"url": "./schemas/package.json"
}]
Reason is: I’m working on a project where there’s a file called “package.json” which is not related to Node: it’s something completely different and internal to the project, and it’s not even in the root directory, but I can’t rename it and VSCode wrongly use the Node’s json-schema and everything become an error.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:7
Top Results From Across the Web
All of my .json files have problems loading reference/schema ...
Here's the exact error I'm getting. Problems loading reference 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load ...
Read more >JSON editing in Visual Studio Code
To disable validation, use the json.validate.enable setting. IntelliSense. Package and project dependencies. We also offer IntelliSense for specific value sets ...
Read more >Understanding JSON Schema
JSON Schema is a powerful tool for validating the structure of JSON data. However, learning to use it by reading its.
Read more >package.json - npm Docs
Specifics of npm's package.json handling. ... At the root of your package it will not override the "files" field, but in subdirectories it...
Read more >The composer.json schema
Files from the root package are always loaded last, and you cannot use files autoloading yourself to override functions from your dependencies. If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am not sure is my situation related with this issue, but I can get any files under
.github/workflows
directory validated correctly if it have the same name with another tool’s config file. E.gdeploy.yml
(deployer),build.yml
(hammerkit), etcI’ve tried to add this to my
settings.json
, but no luckAwesome! Thank you @octoman90, I didn’t realize that we could use that such format. Anyway,
I can confirm that your suggestion is working perfectly for per-project settings, but I can’t get its working as global (workspace) settings.