markdown-links/no-self-destination
disallow redundant self-destination links
- ⚙️ This rule is included in
plugin.configs.recommended
.
📖 Rule Details
This rule reports redundant self-destination links. When a file links to itself using its own filename, a simple fragment should be used instead.
md
<!-- eslint markdown-links/no-self-destination: 'error' -->
<!-- ✓ GOOD -->
[link](#fragment)
[link](./other.md#fragment)
<!-- ✗ BAD -->
[link](./self.md#fragment)
[link](self.md#fragment)
🔧 Options
This rule has no options.
👫 Related Rules
🚀 Version
This rule was introduced in eslint-plugin-markdown-links v0.5.0