Seeking guidance on how to update VS Code's schema cache?
The schema is hardcoded within a minified file named jsonWorker.js
(located at
C:\Users\basaratsyed\AppData\Local\Code\app-0.1.2\resources\app\client\vs\languages\json\jsonWorker.js
). Here is the beautified code using atom-beautify:
this.addPreloadedFileSchema("http://json.schemastore.org/tsconfig", {
title: n.localize("vs_languages_json_jsonSchemaService", 110),
$schema: "http://json-schema.org/draft-04/schema#",
type: "object",
default: {
compilerOptions: {
target: "ES5",
module: "commonjs"
}
},
properties: {
compilerOptions: {
type: "object",
description: n.localize("vs_languages_json_jsonSchemaService", 111),
properties: {
charset: {
description: n.localize("vs_languages_json_jsonSchemaService", 112),
type: "string"
},
// more properties here
}
},
files: {
type: "array",
description: n.localize("vs_languages_json_jsonSchemaService", 137),
items: {
type: "string",
format: "uri"
}
}
}
})
In particular:
module: {
description: n.localize("vs_languages_json_jsonSchemaService", 121),
enum: ["commonjs", "amd"]
},
If you modify it to include additional options like:
module: {
description: n.localize("vs_languages_json_jsonSchemaService", 121),
enum: ["commonjs", "amd", "umd", "system"]
},
And then restart VS Code, the changes take effect.
Image reference: https://i.sstatic.net/Q1Q8g.png
Note that despite beautifying the js file, VS Code continues to function properly ;)