From 08a37bef6151f56da8493199fab5c9c29af4ffeb Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Sun, 13 Dec 2020 23:56:16 -0700 Subject: [PATCH] add JSON schema support for Jest configuration files and package.json --- package.json | 10 ++++++++++ schemas/package.schema.json | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 schemas/package.schema.json diff --git a/package.json b/package.json index 96fe1235d..d6ad69f13 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,16 @@ "path": "./syntaxes/jest-snapshot.tmLanguage" } ], + "jsonValidation": [ + { + "fileMatch": "jest.*json", + "url": "https://askirmas.github.io/jest.schema.json" + }, + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + } + ], "configuration": { "type": "object", "title": "Jest configuration", diff --git a/schemas/package.schema.json b/schemas/package.schema.json new file mode 100644 index 000000000..173fc1dc1 --- /dev/null +++ b/schemas/package.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Jest contributions to package.json", + "type": "object", + "properties": { + "jest": { + "$ref": "https://askirmas.github.io/jest.schema.json" + } + } +}