Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MD042 - No Empty Links

No empty links allowed.

Why This Rule Exists

Empty links with no URL serve no purpose and indicate incomplete content or a mistake during editing. They create broken user experiences when clicked.

Examples

Incorrect

Click [here]() for more information.

See the [documentation]().

[Empty link]()

Correct

Click [here](https://example.com) for more information.

See the [documentation](./docs.md).

[Valid link](https://example.com)

If you need placeholders during drafting, use comments:

<!-- TODO: Add link -->
Click [here](#) for more information.

Configuration

This rule has no configuration options.

When to Disable

  • Draft documents with intentional placeholders
  • Templates where links are filled programmatically

Rule Details

  • Rule ID: MD042
  • Aliases: no-empty-links
  • Category: Links
  • Severity: Error
  • Auto-fix: No
  • MD011 - Reversed link syntax
  • MD039 - Spaces inside link text
  • MD051 - Link fragments
  • MD052 - Reference links and images