Skip to content

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:

markdown
```
const ready = true;
```

Correct:

markdown
```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:

markdown
# Guide

### Setup

Correct:

markdown
# Guide

## Setup

markdown/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:

markdown
[docs]: https://example.com/a
[docs]: https://example.com/b

Correct:

markdown
[docs]: https://example.com/a
[api]: https://example.com/b

markdown/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:

markdown
[docs]: #

Correct:

markdown
[Guide][docs]

[docs]: https://example.com/docs

markdown/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:

markdown
![Fast logo]()

Correct:

markdown
![Fast logo](/logo.png)

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:

markdown
[Fast]()

Correct:

markdown
[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:

markdown
[Guide][ ]

Correct:

markdown
[Guide][guide]

[guide]: /guide

markdown/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:

markdown
##Setup

Correct:

markdown
## Setup

markdown/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:

markdown
[Guide][missing]

Correct:

markdown
[Guide][guide]

[guide]: /guide

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:

markdown
[Install](#missing)

Correct:

markdown
## 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:

markdown
# Guide

# API

Correct:

markdown
# Guide

## API

markdown/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:

markdown
[docs]: /guide

[Guide](docs)

Correct:

markdown
[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:

markdown
(Guide)[/guide]

Correct:

markdown
[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:

markdown
** emphasized **

Correct:

markdown
**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:

markdown
Text only.

[docs]: /guide

Correct:

markdown
[Guide][docs]

[docs]: /guide

markdown/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:

markdown
![](/chart.png)

Correct:

markdown
![Request volume chart](/chart.png)

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:

markdown
| Name | Value |
| --- | --- |
| A | 1 | extra |

Correct:

markdown
| Name | Value |
| --- | --- |
| A | 1 |