From a674ad511659518e3e2511897e0bca0c4790642d Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Fri, 17 Jul 2026 16:43:13 -0400 Subject: [PATCH 1/3] Migrated to draft-07 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/mdxlintrc.json | 4 ++-- src/schemas/json/rehyperc.json | 10 +++++----- src/schemas/json/remarkrc.json | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/schemas/json/mdxlintrc.json b/src/schemas/json/mdxlintrc.json index f0e273cb238..8614d0cf4cd 100644 --- a/src/schemas/json/mdxlintrc.json +++ b/src/schemas/json/mdxlintrc.json @@ -1,7 +1,7 @@ { - "$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.", diff --git a/src/schemas/json/rehyperc.json b/src/schemas/json/rehyperc.json index 18b0347c144..c18df389e5c 100644 --- a/src/schemas/json/rehyperc.json +++ b/src/schemas/json/rehyperc.json @@ -1,7 +1,7 @@ { - "$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.", @@ -36,7 +36,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 +46,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..86d299bcf7d 100644 --- a/src/schemas/json/remarkrc.json +++ b/src/schemas/json/remarkrc.json @@ -1,7 +1,7 @@ { - "$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.", From 35e6c1821a5b3b51d704f91bf49e4f45a487a94a Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:01:38 -0400 Subject: [PATCH 2/3] Linked remarkrc.json - These schemas all use the exact same validation logic for the `plugins` property - They use the exact same tests to validate the `plugins` property logic - Some [remark plugins][remark-plugins] are cross-compatible withunder the [UnifiedJS][unifiedjs] project - [MDX plugins][mdx-plugins] are effectively wrappers for Remark, Rehype and Recma plugins, with Recma seeming to be the parent plugin type of the other two [remark-plugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins [unifiedjs]: https://github.com/unifiedjs/unified#acknowledgements [mdx-plugins]: https://mdxjs.com/docs/extending-mdx/ Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 6 ++++++ src/schemas/json/mdxlintrc.json | 26 +------------------------- src/schemas/json/rehyperc.json | 26 +------------------------- 3 files changed, 8 insertions(+), 50 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 1a645a8c425..b43ed6c7baa 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -1307,6 +1307,9 @@ "maturin.json": { "unknownFormat": ["uint16"] }, + "mdxlintrc.json": { + "externalSchema": ["remarkrc.json"] + }, "minecraft-advancement.json": { "externalSchema": ["base.json"] }, @@ -1508,6 +1511,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 8614d0cf4cd..e15189c6427 100644 --- a/src/schemas/json/mdxlintrc.json +++ b/src/schemas/json/mdxlintrc.json @@ -4,31 +4,7 @@ "additionalProperties": false, "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 c18df389e5c..6824f899c07 100644 --- a/src/schemas/json/rehyperc.json +++ b/src/schemas/json/rehyperc.json @@ -4,31 +4,7 @@ "additionalProperties": false, "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", From 635aae19b6e758256447ef85a36f88a45c737f93 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:01:54 -0400 Subject: [PATCH 3/3] Enabled strict validation Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 3 -- src/schemas/json/remarkrc.json | 66 ++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index b43ed6c7baa..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", diff --git a/src/schemas/json/remarkrc.json b/src/schemas/json/remarkrc.json index 86d299bcf7d..fc9f95316fe 100644 --- a/src/schemas/json/remarkrc.json +++ b/src/schemas/json/remarkrc.json @@ -2,31 +2,61 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/remarkrc.json", "additionalProperties": false, - "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" } ] },