markdownlint-cli2 is a linter for Markdown.
CodeRabbit runs markdownlint-cli2 v0.23.3.
Files
Markdownlint will run on files with the following extensions:.md.markdown
Configuration
boolean
default:true
Enable markdownlint
- .coderabbit.yaml
- Web UI
.coderabbit.yaml
CLI2 configuration
To customize Markdownlint, add a supported configuration file to your repository root. CodeRabbit selects the first existing file from each list below, in the order shown:.markdownlint-cli2.jsonc.markdownlint-cli2.yaml.markdownlint-cli2.cjs.markdownlint-cli2.mjs.markdownlint-cli2.json.markdownlint-cli2.yml.markdownlint-cli2.toml
extends and custom rules resolve from your repository configuration.
Rules configuration
Rules configuration files contain Markdown rule settings:.markdownlint.jsonc.markdownlint.json.markdownlint.yaml.markdownlint.yml.markdownlint.cjs.markdownlint.mjs
config property. Other CLI2 settings, such as ignored paths and custom rules, still apply.
CodeRabbit does not add Chill or Assertive profile defaults when a supported CLI2 configuration or rules configuration is present in the repository root. This also applies to a CLI2 file that contains only settings such as ignored paths, without a config property. With that file and no rules configuration, markdownlint-cli2 uses its own default rules.
.markdownlint-cli2.js and .markdownlint.js are unsupported and do not suppress profile defaults.
CodeRabbit does not modify your configuration. Autofix is disabled during reviews, even if your configuration enables it. Findings for the ignored rules are still filtered out.
Profile defaults
If no supported CLI2 configuration or rules configuration is present in the repository root, CodeRabbit supplies default settings based on the selected profile:- Chill disables ordered-list prefix (
MD029) and first-line heading (MD041) checks. - Assertive enables those checks.
- Both profiles disable fenced-code language (
MD040) and list-marker spacing (MD030) checks, and only check duplicate headings (MD024) among siblings. A repository configuration can enable the fenced-code language check.
When we skip markdownlint
CodeRabbit will skip running markdownlint when:- markdownlint is disabled in your CodeRabbit configuration.
- No existing files in the pull request match the supported extensions.
- markdownlint is already running in GitHub Actions, GitLab CI, CircleCI, or Azure Pipelines.
Ignored rules
The following markdownlint rules are automatically ignored, even when your repository configuration enables them:MD004- ul-style (disallows mixing of list markers)MD007- ul-indent (unordered list indentation)MD009- no-trailing-spaces (disallows trailing whitespace)MD010- no-hard-tabs (hard tabs)MD012- no-multiple-blanks (disallows multiple blank lines)MD013- line-length (enforces maximum line length)MD025- single-title, single-h1 (ensures only one H1 heading per file)MD026- no-trailing-punctuation (disallows trailing punctuation in headings)MD032- blanks-around-lists (disallows multiple blank lines around lists)MD033- no-inline-html (disallows inline HTML inside Markdown)MD034- no-bare-urls (disallows bare URLs)MD036- no-emphasis-as-heading (disallows emphasis instead of headings)MD049- emphasis-style (enforces consistent italic syntax)MD050- strong-style (enforces consistent bold syntax)MD060- table-column-style (enforces table column spacing)