referenceLikeUrls
Reports resource links/images with URLs that match definition identifiers.
✅ This rule is included in the md logical preset.
When you have a definition like [mercury]: https://example.com/mercury/ in your Markdown document, using [text](mercury) as an inline link is likely a mistake.
The URL mercury matches the definition identifier, suggesting you meant to use the reference syntax [text][mercury] instead.
This rule helps catch these common errors where inline URLs accidentally match definition identifiers.
Examples
Section titled “Examples”[**Mercury**](mercury) is the first planet from the sun.
[mercury]: https://example.com/mercury/.
[mercury]: https://example.com/mercury.jpg[FLint](flint) is a great tool.
[flint]: https://flint.fyi[**Mercury**][mercury] is the first planet from the sun.
[mercury]: https://example.com/mercury/![Mercury][mercury]
[mercury]: https://example.com/mercury.jpg[Flint](https://flint.fyi) is a great tool.[Link without definition](some-page)When Not To Use It
Section titled “When Not To Use It”If you use a framework or separate workflow that allows definition identifiers as inline URLs, you can disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
markdown/no-reference-like-url
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.