Skip to content

Config file

The contextlint config file is named contextlint.config.json and lives at the repository root. It is a plain JSON file.

{
"$schema": "https://raw.githubusercontent.com/nozomi-koborinai/contextlint/main/schema.json",
"include": ["docs/**/*.md"],
"rules": [
{ "rule": "ref001" }
]
}
FieldTypeRequiredOverview
$schemastringRecommendedEnables editor autocomplete
includestring[]OptionalGlob patterns for files to validate. See Include patterns
rulesobject[]RequiredArray of rules to enable. See Rules for each rule’s spec

Adding $schema enables autocomplete and inline validation when editing the config file in VS Code, Cursor, JetBrains, and other editors. To pin against a release, replace main in the URL with a tag name such as v1.0.0.

The config file is validated at runtime against a Zod schema. If a field has the wrong type or you specify an unknown rule ID, contextlint prints a user-facing error message at startup.