linkContents
Reports links with empty URLs or only empty fragments.
✅ This rule is included in the md logical preset.
Markdown syntax can make it difficult to easily see that you’ve forgotten to give a link a destination.
This is especially true when writing prose in Markdown, where you may intend to create a link but leave the destination for later and then forget to go back and add it.
A link with an empty URL or only an empty fragment (#) results in broken or non-functional links.
Examples
Section titled “Examples”[Flint]()[Skip to Content](#)[Link text]()[Flint](https://flint.fyi)[Skip to Content](#content)[Link](./page.html)When Not To Use It
Section titled “When Not To Use It”If you intentionally use empty link 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-links - Markdownlint:
no-empty-links
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.