To use a local json schema inside your project with Visual Studio Code create a .vscode
folder and a settings.json
file inside it.
Then set the following configuration tuned up for your specific needs:
fileMatch
will match any file with that naming pattern;url
will start looking from the root folder of your project. Read more about it (here)[https://code.visualstudio.com/docs/languages/json#_mapping-to-a-schema-in-the-workspace].
{
"json.schemas": [
{
"fileMatch": [
"/package.json"
],
"url": "./src/schemas/json/package.json"
}
]
}