diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 1a645a8c425..9d454578f3c 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -171,7 +171,6 @@ "lgtm.json", "libman.json", "lintstagedrc.schema.json", - "mdxlintrc.json", "metricshub.json", "metricshub-connector.json", "minecraft-advancement.json", @@ -228,8 +227,6 @@ "putout.json", "pyrseas-0.8.json", "pylock.json", - "rehyperc.json", - "remarkrc.json", "renovate-39.json", "renovate-40.json", "renovate-41.json", @@ -1307,6 +1304,9 @@ "maturin.json": { "unknownFormat": ["uint16"] }, + "mdxlintrc.json": { + "externalSchema": ["remarkrc.json"] + }, "minecraft-advancement.json": { "externalSchema": ["base.json"] }, @@ -1508,6 +1508,9 @@ "rancher-fleet-0.8.json": { "externalSchema": ["base.json"] }, + "rehyperc.json": { + "externalSchema": ["remarkrc.json"] + }, "renovate-41.json": { "unknownKeywords": ["allowComments", "x-renovate-version"] }, diff --git a/src/schemas/json/mdxlintrc.json b/src/schemas/json/mdxlintrc.json index f0e273cb238..e15189c6427 100644 --- a/src/schemas/json/mdxlintrc.json +++ b/src/schemas/json/mdxlintrc.json @@ -1,34 +1,10 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/mdxlintrc.json", "additionalProperties": false, - "id": "https://json.schemastore.org/mdxlintrc.json", "properties": { "plugins": { - "description": "The plugins field, related to plugins in options, has either an array of plugin names (or paths) or plugin–options tuples, or an object mapping plugins to their options.\nPlugin options can be false, which specifies that a plugin should not be used. In all other cases, they are treated as an object, and merged by the cascade. Thus, it's possible to specify part of the options from one configuration file, and overwrite or extend it from another file.", - "oneOf": [ - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "additionalItems": true, - "items": [ - { - "type": "string" - } - ] - } - ] - } - }, - { - "type": "object" - } - ] + "$ref": "remarkrc.json#/properties/plugins" }, "settings": { "type": "object", diff --git a/src/schemas/json/rehyperc.json b/src/schemas/json/rehyperc.json index 18b0347c144..6824f899c07 100644 --- a/src/schemas/json/rehyperc.json +++ b/src/schemas/json/rehyperc.json @@ -1,34 +1,10 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/rehyperc.json", "additionalProperties": false, - "id": "https://json.schemastore.org/rehyperc.json", "properties": { "plugins": { - "description": "The plugins field, related to plugins in options, has either an array of plugin names (or paths) or plugin–options tuples, or an object mapping plugins to their options.\nPlugin options can be false, which specifies that a plugin should not be used. In all other cases, they are treated as an object, and merged by the cascade. Thus, it's possible to specify part of the options from one configuration file, and overwrite or extend it from another file.", - "oneOf": [ - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "additionalItems": true, - "items": [ - { - "type": "string" - } - ] - } - ] - } - }, - { - "type": "object" - } - ] + "$ref": "remarkrc.json#/properties/plugins" }, "settings": { "type": "object", @@ -36,7 +12,7 @@ "properties": { "fragment": { "description": "Specify whether to parse a fragment, instead of a complete document. In document mode, unopened html, head, and body elements are opened in just the right places.", - "type": ["boolean"], + "type": "boolean", "default": false }, "space": { @@ -46,12 +22,12 @@ }, "emitParseErrors": { "description": "Emit parse errors while parsing on the vfile.\n\nSetting this to true starts emitting HTML parse errors.\n\nSpecific rules can be turned off by setting them to false (or 0). The default, when emitParseErrors: true, is true (or 1), and means that rules emit as warnings. Rules can also be configured with 2, to turn them into fatal errors.", - "type": ["boolean"], + "type": "boolean", "default": false }, "verbose": { "description": "Patch extra positional information. If specified, the following element:", - "type": ["boolean"], + "type": "boolean", "default": false }, "entities": { diff --git a/src/schemas/json/remarkrc.json b/src/schemas/json/remarkrc.json index 78006120dcb..fc9f95316fe 100644 --- a/src/schemas/json/remarkrc.json +++ b/src/schemas/json/remarkrc.json @@ -1,32 +1,62 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/remarkrc.json", "additionalProperties": false, - "id": "https://json.schemastore.org/remarkrc.json", - "properties": { - "plugins": { - "description": "The plugins field, related to plugins in options, has either an array of plugin names (or paths) or plugin–options tuples, or an object mapping plugins to their options.\nPlugin options can be false, which specifies that a plugin should not be used. In all other cases, they are treated as an object, and merged by the cascade. Thus, it's possible to specify part of the options from one configuration file, and overwrite or extend it from another file.", + "definitions": { + "partialPluginOptions": { "oneOf": [ { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "additionalItems": true, - "items": [ - { + "type": "string" + }, + { + "type": "object", + "patternProperties": { + ".*": { + "type": "boolean" + } + } + } + ] + }, + "pluginArray": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/partialPluginOptions" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/partialPluginOptions" + }, + { + "type": "array", + "items": { "type": "string" } - ] - } - ] + } + ] + } } + ] + } + }, + "pluginObject": { + "type": "object" + } + }, + "properties": { + "plugins": { + "description": "The plugins field, related to plugins in options, has either an array of plugin names (or paths) or plugin–options tuples, or an object mapping plugins to their options.\nPlugin options can be false, which specifies that a plugin should not be used. In all other cases, they are treated as an object, and merged by the cascade. Thus, it's possible to specify part of the options from one configuration file, and overwrite or extend it from another file.", + "oneOf": [ + { + "$ref": "#/definitions/pluginArray" }, { - "type": "object" + "$ref": "#/definitions/pluginObject" } ] },