From f9fa4ae361724837b66c4bf0716ef0303c00470e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 18 Sep 2017 14:55:01 -0700 Subject: [PATCH] Add schema for contributed markdown API Fixes #31874 --- extensions/markdown/package.json | 8 ++++- .../markdown/schemas/package.schema.json | 32 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 extensions/markdown/schemas/package.schema.json diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index c34e42a7ac6..a2bd22adaf4 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -234,7 +234,13 @@ "editor.wordWrap": "on", "editor.quickSuggestions": false } - } + }, + "jsonValidation": [ + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + } + ] }, "scripts": { "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown ./tsconfig.json", diff --git a/extensions/markdown/schemas/package.schema.json b/extensions/markdown/schemas/package.schema.json new file mode 100644 index 00000000000..62304f1bb57 --- /dev/null +++ b/extensions/markdown/schemas/package.schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Markdown contributions to package.json", + "type": "object", + "properties": { + "contributes": { + "type": "object", + "properties": { + "markdown.previewStyles": { + "type": "array", + "description": "Contributed CSS files that change the look or layout of the Markdown preview", + "items": { + "type": "string", + "description": "Extension relative path to a css file" + } + }, + "markdown.previewScripts": { + "type": "array", + "description": "Contributed scripts that are executed in the Markdown preview", + "items": { + "type": "string", + "description": "Extension relative path to a JavaScript file" + } + }, + "markdown.markdownItPlugins": { + "type": "boolean", + "description": "Does this extension contributes a markdown-it plugin?" + } + } + } + } +} \ No newline at end of file