Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.08 KB

ValidatingConfiguration.md

File metadata and controls

24 lines (17 loc) · 1.08 KB

Validating Configuration

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

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

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

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

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

A similar process is documented for validating markdownlint configuration objects: Validating Configuration.