Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rules Reference

mdbook-lint provides comprehensive markdown linting with two categories of rules:

Standard Markdown Rules

59 rules (MD001-MD059) based on the widely-used markdownlint specification. These rules ensure consistent markdown formatting and style across your documentation.

Categories

mdBook-Specific Rules

7 rules (MDBOOK001-MDBOOK007) specifically designed for mdBook projects. These rules validate mdBook-specific syntax and conventions.

Rules

Quick Reference

Rules with Automatic Fix Support

The following rules can automatically fix violations:

  • MD009 - Remove trailing spaces
  • MD010 - Replace hard tabs with spaces
  • MD012 - Remove multiple consecutive blank lines
  • MD018 - Add space after hash in ATX headings
  • MD019 - Fix multiple spaces after hash
  • MD020 - Remove spaces inside closed ATX headings
  • MD021 - Fix multiple spaces inside closed ATX headings
  • MD023 - Remove indentation from headings
  • MD027 - Fix multiple spaces after blockquote symbol
  • MD030 - Fix spaces after list markers
  • MD034 - Wrap bare URLs in angle brackets
  • MD047 - Ensure files end with single newline

Disabling Rules

Rules can be disabled globally or for specific files:

# Disable globally
[rules]
MD002 = false
MD041 = false

# Disable for specific files
[ignore]
MD013 = ["CHANGELOG.md", "docs/api/*.md"]