labelReferences
Reports missing label references.
✅ This rule is included in the md logical preset.
Markdown allows you to use labels as placeholders for URLs in both links and images using square brackets. If a label is referenced but never defined, Markdown doesn’t render a link and instead renders plain text, which is likely not the intended behavior. Each label reference must have a corresponding definition somewhere in the document.
Examples
Section titled “Examples”[Flint][flint][flint][]![Logo][logo][Flint][flint]
[flint]: https://flint.fyi[flint][]
[flint]: https://flint.fyi![Logo][logo]
[logo]: ./logo.pngWhen Not To Use It
Section titled “When Not To Use It”If you use a framework or other workflow that fills in labels for you, you can disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
markdown/no-missing-label-refs - Markdownlint:
reference-links-images
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.