markdown
Markdown files: the markdownlint rules, and code blocks that parse. Guide: Markdown.
Selected when
Section titled “Selected when”A scope has file extensions .md or .mdx. Also when mkdocs requires it.
Checks
Section titled “Checks”markdownlint
Section titled “markdownlint”Checks the headings, lists, and spacing of every Markdown file.
Runs at the commit stage, with markdownlint-cli2. gspot check --fix fixes what it can.
Consistent Markdown renders the same in every viewer.
What to do
Section titled “What to do”Run the fix: command that the report prints for the rules that fix themselves; read the rule name for the rest.
Example
Section titled “Example”A heading that jumps from level one to level three reports MD001. Change the later heading to level two.
Turn it off
Section titled “Turn it off”gspot ignore markdown/markdownlint --paths "<path>" --reason "<why>"gspot ignore markdown/markdownlint --rule <rule> --reason "<why>"To silence one place, write a comment such as:
<!-- markdownlint-disable-next-line MD013 -- reason: the table row cannot wrap -->fences
Section titled “fences”Checks the code blocks of Markdown and MDX files for syntax errors.
Runs at the commit stage.
A code block that fails to parse shows readers a program that cannot run.
What to do
Section titled “What to do”Fix the code, or label the block text when it holds prose.
Example
Section titled “Example”A bash fence with if then reports a syntax error. Correct the Bash, or label the block text when it holds no code.
Turn it off
Section titled “Turn it off”gspot ignore markdown/fences --paths "<path>" --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
tools.markdownlint.rules |
Option tables by Markdown rule ID, such as MD024; the level decides which rules run. Ignore a finding with gspot ignore markdown/markdownlint --rule <rule> --reason "<why>". |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| markdownlint-cli2 | 0.24.0 |
Files gspot writes
Section titled “Files gspot writes”.markdownlint.jsonc, .gspot/configurations/markdown/markdownlint.jsonc, and .gspot/configurations/markdown/markdownlint-cli2.mjs