mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add $id to configuration schema, switch to version-specific repository links.
This commit is contained in:
parent
24ee072442
commit
316b0989c3
6 changed files with 36 additions and 33 deletions
|
|
@ -7,13 +7,22 @@ const path = require("node:path");
|
|||
/** @type {import("../lib/markdownlint").Rule[]} */
|
||||
const rules = require("../lib/rules");
|
||||
const jsonSchemaToTypeScript = require("json-schema-to-typescript");
|
||||
const { version } = require("../lib/constants");
|
||||
|
||||
const schemaUri = `https://raw.githubusercontent.com/DavidAnson/markdownlint/v${version}/schema/markdownlint-config-schema.json`;
|
||||
|
||||
// Schema scaffolding
|
||||
const schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": schemaUri,
|
||||
"title": "markdownlint configuration schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (expected by some editors)",
|
||||
"type": "string",
|
||||
"default": schemaUri
|
||||
},
|
||||
"default": {
|
||||
"description": "Default state for all rules",
|
||||
"type": "boolean",
|
||||
|
|
@ -26,12 +35,6 @@ const schema = {
|
|||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (used by some editors)",
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint" +
|
||||
"/main/schema/markdownlint-config-schema.json"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.32.1/schema/markdownlint-config-schema.json",
|
||||
"title": "markdownlint configuration schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (expected by some editors)",
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.32.1/schema/markdownlint-config-schema.json"
|
||||
},
|
||||
"default": {
|
||||
"description": "Default state for all rules",
|
||||
"type": "boolean",
|
||||
|
|
@ -16,11 +22,6 @@
|
|||
],
|
||||
"default": null
|
||||
},
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (used by some editors)",
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json"
|
||||
},
|
||||
"MD001": {
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md",
|
||||
"type": "boolean",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue