Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 828 Bytes

File metadata and controls

29 lines (16 loc) · 828 Bytes

no-empty-links

Disallow empty links.

Background

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, in which case you may intend to create a link but leave the destination for later...and then forget to go back and add it.

Rule Details

This rule warns when it finds links that either don't have a URL specified or have only an empty fragment ("#").

Examples of incorrect code for this rule:

<!-- eslint markdown/no-empty-links: "error" -->

[ESLint]()

[Skip to Content](#)

When Not to Use It

If you aren't concerned with empty links, you can safely disable this rule.

Prior Art