Lint rules

Every rule shipped by mdwright's standard library, grouped by how they behave on a fresh install. Each link points to the rule's long-form explanation; mdwright explain <name> prints the same text from the command line.

Default rules

On by default. A diagnostic from one of these fails mdwright check --check.

RuleFixDescription
unbalanced-backticknoBacktick in prose that could not be paired with a closing fence.
math/unbalanced-delimnoTeX-style math open delimiter (\[, \(, $$, $) with no matching close.
math/unbalanced-envnoLaTeX \begin{env} with no matching \end{env} at the same nesting depth.
math/unbalanced-bracesno{ / } inside a math body do not balance; math body normalisation is skipped for that region.
adjacent-code-no-spacenoInline code span adjacent to a letter without whitespace.
heading-punctuationnoTrailing . or : on a heading.
orphan-reference-linknoReference-style link with no matching [label]: definition.
duplicate-link-labelnoTwo [label]: definitions with the same label.
bare-urlyesBare URL in prose; wrap in <…> for a CommonMark autolink.
trailing-whitespaceyesTrailing whitespace at end of line.
inconsistent-list-markernoMixed - / * / + markers in one bullet list.

Default advisories

On by default but informational: they report but do not fail --check.

RuleFixDescription
duplicate-headingnoTwo headings at the same level under the same parent with the same text.
unicodeable-subscriptyesBraced super/subscript that has a single-codepoint Unicode form.
info-string-typonoFenced code block info string not in the known-languages allowlist.

Opt-in rules

Off by default. Enable with lint.extend-select = ["name"] in configuration.

RuleFixDescription
list-tightness-flippednolist tightness from the tree disagrees with tightness from source bytes
stray-dollaryesLiteral $ in prose (opt-in for projects that don't use $…$ math).
latex-commandyesLaTeX control sequence in prose (opt-in for Unicode-math projects).
escaped-emphasisyesLiteral \_, \*, or \` escape in prose (mdformat damage).
subscript-damageyesIdentifier with * where a _ subscript was expected (formatter damage).