mdsmith
Esc
    v0.52.0 GitHub
    MDS002 heading ready

    MDS002: heading-style

    Heading style must be consistent.

    # Settings

    SettingTypeDefaultDescription
    stylestring"atx""atx" (# Heading) or "setext" (underline with ===/---)

    # Config

    Enable (default):

    rules:
      heading-style:
        style: atx

    Disable:

    rules:
      heading-style: false

    Custom (setext style):

    rules:
      heading-style:
        style: setext

    # Examples

    # Bad (when style is atx)

    Setext heading used when ATX is required:

    # Title
    
    Section
    -------

    Setext heading with marker:

    # Title
    
    Section
    -------
    
    <?allow-empty-section?>

    # Bad (when style is setext)

    ATX heading used when Setext is required:

    # Title
    
    ## Section

    # Good (when style is atx)

    # Title
    
    ## Section
    
    Body text.

    # Good (when style is setext)

    Title
    =====
    
    Section
    -------
    
    Body text.

    # Diagnostics

    MessageCondition
    heading style should be atxstyle: atx and a Setext heading is found
    heading style should be setextstyle: setext and an ATX heading is found

    # Meta-Information

    • ID: MDS002
    • Name: heading-style
    • Status: ready
    • Default: enabled, style: atx
    • Fixable: yes
    • Implementation: source
    • Category: heading
    • markdownlint: MD003 (heading-style)
    • rumdl: MD003 (heading-style)
    • mado: MD003 (heading-style)
    • gomarklint: no-setext-headings