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.