Skip to content

MD004 - ul-style

Description

This rule ensures that unordered list markers throughout a document follow a consistent style. It validates that bullet points use matching symbols (asterisks, plus signs, or dashes) according to the configured preference. In consistent mode, all list markers across the entire document must match the first one used, even across separate lists. In sublist mode, each nesting level must use the same marker style throughout the document.

Rationale

Consistent formatting makes it easier to understand a document. Uniform list styling promotes readability and professional presentation, reducing cognitive friction when reading list content.

Configuration

style

Required list marker style.

  • Default: consistent
  • Options:
    • consistent: All list markers in the document must match the first one used
    • asterisk: All list markers must be *
    • plus: All list markers must be +
    • dash: All list markers must be -
    • sublist: Each nesting level must use the same marker style throughout the document

Examples

Invalid

# Mixed List Markers

- Item with dash
* Item with asterisk
+ Item with plus

Valid

# Consistent List Markers

- Item 1
- Item 2
- Item 3
  - Nested item 1
  - Nested item 2
- Item 4