Skip to content

Comparison With markdownlint Rules

eslint-plugin-markdown-preferences does not aim for compatibility with markdownlint, but comparing rules is useful to check the strengths of each.
Also, by combining markdownlint and using each rule, you may be able to achieve the optimal Markdown style for you.
eslint-plugin-markdown-preferences is designed to provide useful features when used together with @eslint/markdown, so rules from @eslint/markdown are also compared.

Please note that each OSS is constantly evolving, so this list is not exhaustive.

Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Heading levels should only increment by oneMD001 heading-increment
Heading levels should only increment by one level at a time
markdown/heading-increment
Enforce heading levels increment by one
--
Level 1 Heading notation styleMD003 heading-style
Heading style
---- markdown-preferences/level1-heading-style
enforce consistent style for level 1 headings
Level 2 Heading notation styleMD003 heading-style
Heading style
--markdown-preferences/level2-heading-style
enforce consistent style for level 2 headings
ATX heading closing # presenceMD003 heading-style
Heading style
--markdown-preferences/atx-heading-closing-sequence
enforce consistent use of closing sequence in ATX headings.
ATX heading closing # lengthmarkdown-preferences/atx-heading-closing-sequence-length
enforce consistent length for the closing sequence (trailing #s) in ATX headings.
Require space after ATX heading #MD018 no-missing-space-atx
No space after hash on atx style heading
markdown/no-missing-atx-heading-space
Disallow headings without a space after the hash characters
--
Disallow multiple spaces after ATX heading #MD019 no-multiple-space-atx
Multiple spaces after hash on atx style heading
--markdown-preferences/no-multi-spaces
disallow multiple spaces
Require space before closing ATX heading #MD020 no-missing-space-closed-atx
No space inside hashes on closed atx style heading
----
Disallow multiple spaces before closing ATX heading #MD021 no-multiple-space-closed-atx
Multiple spaces inside hashes on closed atx style heading
--markdown-preferences/no-multi-spaces
disallow multiple spaces
Require empty lines around headingsMD022 blanks-around-headings
Headings should be surrounded by blank lines
--markdown-preferences/padding-line-between-blocks
require or disallow padding lines between block elements
Heading indentationMD023 heading-start-left
Headings must start at the beginning of the line
----
Disallow duplicate headingsMD024 no-duplicate-heading
Multiple headings with the same content
markdown/no-duplicate-headings
Disallow duplicate headings in the same document
--
Limit to one <h1> headingMD025 single-title/single-h1
Multiple top-level headings in the same document
markdown/no-multiple-h1
Disallow multiple H1 headings in the same document
--
Disallow trailing punctuation in headingsMD026 no-trailing-punctuation
Trailing punctuation in heading
----
Require emphasis-like headings to be real headingsMD036 no-emphasis-as-heading
Emphasis used instead of a heading
----
Require heading at the start of documentMD041 first-line-heading/first-line-h1
First line in a file should be a top-level heading
----
Enforce preferred heading structureMD043 required-headings
Required heading structure
----
Headings casing----markdown-preferences/heading-casing
enforce consistent casing in headings
Setext heading underline length----markdown-preferences/setext-heading-underline-length
enforce consistent underline length.
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
<ul> notation styleMD004 ul-style
Unordered list style
--markdown-preferences/bullet-list-marker-style
enforce consistent bullet list (unordered list) marker style
List indentationMD005 list-indent
Inconsistent indentation for list items at the same level
--markdown-preferences/list-marker-alignment
enforce consistent alignment of list markers
<ul> indentationMD007 ul-indent
Unordered list indentation
----
Enforce <ol> marker sequenceMD029 ol-prefix
Ordered list item prefix
--markdown-preferences/ordered-list-marker-sequence
enforce that ordered list markers use sequential numbers
Enforce <ol> marker startMD029 ol-prefix
Ordered list item prefix
--markdown-preferences/ordered-list-marker-start
enforce that ordered list markers start with 1 or 0
Enforce <ol> marker style--markdown-preferences/ordered-list-marker-style
enforce consistent ordered list marker style
Consistent spaces after list markerMD030 list-marker-space
Spaces after list markers
----
Require empty lines around listsMD032 blanks-around-lists
Lists should be surrounded by blank lines
--markdown-preferences/padding-line-between-blocks
require or disallow padding lines between block elements
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow bare URLsMD034 no-bare-urls
Bare URL used
markdown/no-bare-urls
Disallow bare URLs
markdown-preferences/prefer-autolinks
enforce the use of autolinks for URLs
Spaces around the text in linksMD039 no-space-in-links
Spaces inside link text
--markdown-preferences/link-bracket-spacing
enforce consistent spacing inside link brackets
Disallow empty linksMD042 no-empty-links
No empty links
markdown/no-empty-links
Disallow empty links
--
Disallow empty images--markdown/no-empty-images
Disallow empty images
--
Enforce alt text for imagesMD045 no-alt-text
Images should have alternate text (alt text)
markdown/require-alt-text
Require alternative text for images
--
Disallow missing reference for link fragmentsMD051 link-fragments
Link fragments should be valid
markdown/no-missing-link-fragments
Disallow link fragments that do not reference valid headings
--
Disallow missing reference for links/imagesMD052 reference-links-images
Reference links and images should use a label that is defined
markdown/no-missing-label-refs
Disallow missing label references
--
Link and image notation styleMD054 link-image-style
Link and image style
----
Require descriptive link textMD059 descriptive-link-text
Link text should be descriptive
----
Enforce specific words to be links----markdown-preferences/prefer-linked-words
enforce the specified word to be a link
Spaces around the brackets in links/images----markdown-preferences/link-bracket-spacing
enforce consistent spacing inside link brackets
Newlines around the brackets in links/images----markdown-preferences/link-bracket-newline
enforce linebreaks after opening and before closing link brackets
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow unused link/image definitionsMD053 link-image-reference-definitions
Link and image reference definitions should be needed
markdown/no-unused-definitions
Disallow unused definitions
--
Enforce using link reference definitionsMD054 link-image-style
Link and image style
--markdown-preferences/prefer-link-reference-definitions
enforce using link reference definitions instead of inline links
Disallow unused footnote definitions--markdown/no-unused-definitions
Disallow unused definitions
--
Disallow duplicate definitions--markdown/no-duplicate-definitions
Disallow duplicate definitions
--
Disallow empty definitions--markdown/no-empty-definitions
Disallow empty definitions
--
Require link/footnote definitions at end----markdown-preferences/definitions-last
require link definitions and footnote definitions to be placed at the end of the document
Enforce order of link/footnote definitions----markdown-preferences/sort-definitions
enforce a specific order for link definitions and footnote definitions
Spaces around the brackets in link definitions----markdown-preferences/link-bracket-spacing
enforce consistent spacing inside link brackets
Newlines around the brackets in link definitions----markdown-preferences/link-bracket-newline
enforce linebreaks after opening and before closing link brackets
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow $ signs in shell codeMD014 commands-show-output
Dollar signs used before commands without showing output
----
Require empty lines around fenced code blocksMD031 blanks-around-fences
Fenced code blocks should be surrounded by blank lines
--markdown-preferences/padding-line-between-blocks
require or disallow padding lines between block elements
Spaces around the text in inline codesMD038 no-space-in-code
Spaces inside code span elements
----
Fenced code blocks should have a languageMD040 fenced-code-language
Fenced code blocks should have a language specified
markdown/fenced-code-language
Require languages for fenced code blocks
--
Fenced code block styleMD046 code-block-style
Code block style
--markdown-preferences/prefer-fenced-code-blocks
enforce the use of fenced code blocks over indented code blocks
Code fence styleMD048 code-fence-style
Code fence style
--markdown-preferences/code-fence-style
enforce a consistent code fence style (backtick or tilde) in Markdown fenced code blocks.
Canonical code block language names----markdown-preferences/canonical-code-block-language
enforce canonical language names in code blocks
Code fence length----markdown-preferences/code-fence-length
enforce consistent length for code fences in Markdown fenced code blocks
Enforce specific words to be inline codes----markdown-preferences/prefer-inline-code-words
enforce the use of inline code for specific words
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow multiple spaces after blockquote symbolMD027 no-multiple-space-blockquote
Multiple spaces after blockquote symbol
----
Require empty lines around blockquotesMD028 no-blanks-blockquote
Blank line inside blockquote
--markdown-preferences/no-laziness-blockquotes
disallow laziness in blockquotes
Disallow laziness in blockquotes----markdown-preferences/no-laziness-blockquotes
disallow laziness in blockquotes
Blockquote marker alignment----markdown-preferences/blockquote-marker-alignment
enforce consistent alignment of blockquote markers
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Table pipe styleMD055 table-pipe-style
Table pipe style
----
Table column countMD056 table-column-count
Table column count
markdown/table-column-count
Disallow data rows in a table from having more cells than the header row
--
Require empty lines around tablesMD058 blanks-around-tables
Tables should be surrounded by blank lines
--markdown-preferences/padding-line-between-blocks
require or disallow padding lines between block elements
Table header casing----markdown-preferences/table-header-casing
enforce consistent casing in table header cells
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Spaces around the text in emphasisMD037 no-space-in-emphasis
Spaces inside emphasis markers
markdown/no-space-in-emphasis
Disallow spaces around emphasis markers
--
Emphasis notation styleMD049 emphasis-style
Emphasis style
--markdown-preferences/emphasis-delimiters-style
enforce a consistent delimiter style for emphasis and strong emphasis
Strong emphasis notation styleMD050 strong-style
Strong style
--markdown-preferences/emphasis-delimiters-style
enforce a consistent delimiter style for emphasis and strong emphasis
Strikethrough notation style----markdown-preferences/strikethrough-delimiters-style
enforce a consistent delimiter style for strikethrough
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
<hr> notation styleMD035 hr-style
Horizontal rule style
--markdown-preferences/thematic-break-character-style
enforce a consistent character style for thematic breaks (horizontal rules) in Markdown
<hr> length----markdown-preferences/thematic-break-length
enforce consistent length for thematic breaks (horizontal rules) in Markdown
<hr> sequence pattern----markdown-preferences/thematic-break-sequence-pattern
enforce consistent sequence pattern for thematic breaks (horizontal rules) in Markdown
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow inline HTMLMD033 no-inline-html
Inline HTML
markdown/no-html
Disallow HTML tags
--
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Emoji notation style----markdown-preferences/emoji-notation
enforce consistent emoji notation style in Markdown files
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow trailing spacesMD009 no-trailing-spaces
Trailing spaces
--markdown-preferences/no-trailing-spaces
disallow trailing whitespace at the end of lines in Markdown files
Disallow hard tabsMD010 no-hard-tabs
Hard tabs
----
Disallow multiple empty linesMD012 no-multiple-blanks
Multiple consecutive blank lines
--markdown-preferences/no-multiple-empty-lines
disallow multiple empty lines in Markdown files
Require linebreak at the end of filesMD047 single-trailing-newline
Files should end with a single newline character
----
Disallow multiple spaces----markdown-preferences/no-multi-spaces
disallow multiple spaces
Disallow trailing backslash linebreak----markdown-preferences/no-text-backslash-linebreak
disallow text backslash at the end of a line
Enforce hard linebreak style----markdown-preferences/hard-linebreak-style
enforce consistent hard linebreak style
Require or disallow padding lines between blocks----markdown-preferences/padding-line-between-blocks
require or disallow padding lines between block elements
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Enforce a maximum line lengthMD013 line-length
Line length
----
Proper namesMD044 proper-names
Proper names should have the correct capitalization
----
Descriptionmarkdownlint Rules@eslint/markdown Ruleseslint-plugin-markdown-preferences Rules
Disallow reversed link/image syntaxMD011 no-reversed-links
Reversed link syntax
markdown/no-reversed-media-syntax
Disallow reversed link and image syntax
--
Disallow invalid link label references--markdown/no-invalid-label-refs
Disallow invalid label references
--