Configuration#
A JSON config is read from the path given by --config (defaults to .gomarklint.json) if the file exists.
Example#
{
"include": ["docs", "README.md"],
"ignore": ["node_modules", "vendor"],
"output": "text",
"minHeadingLevel": 2,
"enableLinkCheck": false,
"enableHeadingLevelCheck": true,
"enableDuplicateHeadingCheck": true,
"skipLinkPatterns": [
"^https://localhost(:[0-9]+)?/",
"example\\.com"
]
}Field reference#
| Field | Type | Default | Description |
|---|---|---|---|
include | string[] | ["README.md", "testdata"] | Paths to lint when no CLI paths are provided. |
ignore | string[] | [] | Path patterns to exclude. |
output | string | text | text or json. |
minHeadingLevel | int | 2 | Minimum allowed heading level. |
enableHeadingLevelCheck | bool | true | Enable heading level validation. |
enableDuplicateHeadingCheck | bool | true | Enable duplicate heading detection. |
enableLinkCheck | bool | false | Enable external link checking. |
enableNoMultipleBlankLinesCheck | bool | true | Disallow multiple consecutive blank lines. |
enableNoSetextHeadingsCheck | bool | true | Disallow setext-style headings. |
enableFinalBlankLineCheck | bool | true | Enforce a final blank line at end of file. |
linkCheckTimeoutSeconds | int | 5 | Timeout in seconds for each external link request. |
skipLinkPatterns | string[] | [] | Regex patterns for URLs to skip during link checking. |
Notes#
- CLI flags take precedence over config values.
- If no CLI paths are provided,
includebecomes the target set.