Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1015 Bytes

ValidatingConfiguration.md

File metadata and controls

28 lines (20 loc) · 1015 Bytes

Validating Configuration

A JSON Schema is provided to enable validating configuration objects: markdownlint-config-schema.json

Some editors automatically use a JSON Schema with files that reference it. For example, a .markdownlint.json file with:

"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json"

A JSON Schema validator can be used to check configuration files like so:

npx ajv-cli validate -s ./markdownlint/schema/markdownlint-config-schema.json -d "**/.markdownlint.{json,yaml}" --strict=false

By default, any rule name is valid in order to allow for custom rules. To ensure that only built-in rules are used, change the value of #/additionalProperties (at the bottom of the schema file) to false before validating:

"additionalProperties": false