Markdown ​
This page documents 17 rules from the current dependency versions and repository configuration. Each entry includes effective severity, scope, upstream description, common messages, and incorrect/correct examples.
Rules from third-party presets (17 rules) ​
markdown/fenced-code-language ​
Checks the corresponding code constraint. Upstream description: Require languages for fenced code blocks
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Missing code block language.;Code block language "{{lang}}" is not allowed. - Example type: Direct code example for a third-party preset rule
Incorrect:
```
const ready = true;
```Correct:
```js
const ready = true;
```markdown/heading-increment ​
Checks the corresponding code constraint. Upstream description: Enforce heading levels increment by one
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Heading level skipped from {{fromLevel}} to {{toLevel}}. - Example type: Direct code example for a third-party preset rule
Incorrect:
# Guide
### SetupCorrect:
# Guide
## Setupmarkdown/no-duplicate-definitions ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow duplicate definitions
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected duplicate definition '{{ identifier }}' (label: '{{ label }}') found. First defined at line {{ firstLine }} (label: '{{ firstLabel }}').;Unexpected duplicate footnote definition '{{ identifier }}' (label: '{{ label }}') found. First defined at line {{ firstLine }} (label: '{{ firstLabel }}'). - Example type: Direct code example for a third-party preset rule
Incorrect:
[docs]: https://example.com/a
[docs]: https://example.com/bCorrect:
[docs]: https://example.com/a
[api]: https://example.com/bmarkdown/no-empty-definitions ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow empty definitions
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected empty definition '{{ identifier }}' (label: '{{ label }}') found.;Unexpected empty footnote definition '{{ identifier }}' (label: '{{ label }}') found. - Example type: Direct code example for a third-party preset rule
Incorrect:
[docs]: #Correct:
[Guide][docs]
[docs]: https://example.com/docsmarkdown/no-empty-images ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow empty images
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected empty image found. - Example type: Direct code example for a third-party preset rule
Incorrect:
![Fast logo]()Correct:
markdown/no-empty-links ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow empty links
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected empty link found. - Example type: Direct code example for a third-party preset rule
Incorrect:
[Fast]()Correct:
[Fast](https://example.com)markdown/no-invalid-label-refs ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow invalid label references
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Label reference '{{label}}' is invalid due to white space between [ and ]. - Example type: Direct code example for a third-party preset rule
Incorrect:
[Guide][ ]Correct:
[Guide][guide]
[guide]: /guidemarkdown/no-missing-atx-heading-space ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow headings without a space after the hash characters
- Effective severity and scope: error: Markdown
- Autofix: Supported; review semantics and the diff before applying
- Rule source: Official documentation
- Common messages:
Missing space {{position}} hash(es) on ATX style heading. - Example type: Direct code example for a third-party preset rule
Incorrect:
##SetupCorrect:
## Setupmarkdown/no-missing-label-refs ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow missing label references
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Label reference '{{label}}' not found. - Example type: Direct code example for a third-party preset rule
Incorrect:
[Guide][missing]Correct:
[Guide][guide]
[guide]: /guidemarkdown/no-missing-link-fragments ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow link fragments that do not reference valid headings
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Link fragment '#{{fragment}}' does not reference a heading or anchor in this document. - Example type: Direct code example for a third-party preset rule
Incorrect:
[Install](#missing)Correct:
## Install
[Install](#install)markdown/no-multiple-h1 ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow multiple H1 headings in the same document
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected additional H1 heading found. - Example type: Direct code example for a third-party preset rule
Incorrect:
# Guide
# APICorrect:
# Guide
## APImarkdown/no-reference-like-urls ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow URLs that match defined reference identifiers
- Effective severity and scope: error: Markdown
- Autofix: Supported; review semantics and the diff before applying
- Rule source: Official documentation
- Common messages:
Unexpected resource {{type}} ('{{prefix}}[text](url)') with URL that matches a definition identifier. Use '[text][id]' syntax instead. - Example type: Direct code example for a third-party preset rule
Incorrect:
[docs]: /guide
[Guide](docs)Correct:
[docs]: /guide
[Guide][docs]markdown/no-reversed-media-syntax ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow reversed link and image syntax
- Effective severity and scope: error: Markdown
- Autofix: Supported; review semantics and the diff before applying
- Rule source: Official documentation
- Common messages:
Unexpected reversed syntax found. Use [label](URL) syntax instead. - Example type: Direct code example for a third-party preset rule
Incorrect:
(Guide)[/guide]Correct:
[Guide](/guide)markdown/no-space-in-emphasis ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow spaces around emphasis markers
- Effective severity and scope: error: Markdown
- Autofix: Supported; review semantics and the diff before applying
- Rule source: Official documentation
- Common messages:
Unexpected space around emphasis marker. - Example type: Direct code example for a third-party preset rule
Incorrect:
** emphasized **Correct:
**emphasized**markdown/no-unused-definitions ​
Disallows unsafe, invalid, or misleading constructs. Upstream description: Disallow unused definitions
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Unexpected unused definition '{{ identifier }}' (label: '{{ label }}') found.;Unexpected unused footnote definition '{{ identifier }}' (label: '{{ label }}') found. - Example type: Direct code example for a third-party preset rule
Incorrect:
Text only.
[docs]: /guideCorrect:
[Guide][docs]
[docs]: /guidemarkdown/require-alt-text ​
Requires the declarations, properties, or structures specified by this rule. Upstream description: Require alternative text for images
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Alternative text for image is required. - Example type: Direct code example for a third-party preset rule
Incorrect:
Correct:
markdown/table-column-count ​
Checks the corresponding code constraint. Upstream description: Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
- Effective severity and scope: error: Markdown
- Autofix: Unsupported or not declared upstream
- Rule source: Official documentation
- Common messages:
Table column count mismatch (Expected: {{expectedCells}}, Actual: {{actualCells}}), extra data starting here will be ignored.;Table column count mismatch (Expected: {{expectedCells}}, Actual: {{actualCells}}), row might be missing data. - Example type: Direct code example for a third-party preset rule
Incorrect:
| Name | Value |
| --- | --- |
| A | 1 | extra |Correct:
| Name | Value |
| --- | --- |
| A | 1 |