Skip to content

markdown-preferences/blockquote-marker-alignment

enforce consistent alignment of blockquote markers

  • ⚙️ This rule is included in plugin.configs.recommended and plugin.configs.standard.
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule enforces consistent alignment (indentation) of blockquote markers (>) at the same nesting level. All blockquote lines at the same level should have the same amount of indentation before their markers.

What this rule checks:

  • Single-level blockquotes
  • Multi-level nested blockquotes
  • Blockquotes with various indentation levels

What this rule does:

  • Detects inconsistent spacing before blockquote markers
  • Automatically fixes alignment issues when using --fix
md
<!-- eslint markdown-preferences/blockquote-marker-alignment: 'error' -->

<!-- ✓ GOOD: Consistent alignment within each nesting level -->
> First level blockquote.
> Another line at first level.
> > Nested blockquote.
> > Another nested line.
>
> Back to first level.

  > Indented blockquote.
  > All lines consistently indented.

<!-- ✗ BAD: Inconsistent alignment -->
> First level blockquote.
 
>
This line has extra indentation.
>
> Back to normal. > > Nested blockquote. >
>
This nested line has extra space.
> > Back to correct nesting.

🔧 Options

This rule has no options.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-markdown-preferences v0.15.0

🔍 Implementation