definitionContents
Reports definitions with empty URLs or only empty fragments.
✅ This rule is included in the md logical preset.
Definitions in Markdown provide URLs for reference-style links and images.
A definition with an empty URL or only an empty fragment (#) provides no useful destination and will result in broken links.
Empty definitions are often created as placeholders but forgotten to be filled in.
Examples
Section titled “Examples”[earth]: <>[moon]: #[mars]:[earth]: https://example.com/earth/[moon]: #section[mercury]: https://example.com/mercury/
Check out [Mercury][mercury][//]: <> (This is a comment)[//]: # (This is also a comment)When Not To Use It
Section titled “When Not To Use It”If you intentionally use empty definition URLs as placeholders and have a framework or other workflow that always fills them in later, you might want to disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
markdown/no-empty-definitions
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.