Skip to main content
Detects invalid link formats on the page
Rule IDlinks/invalid-links
CategoryLinks
ScopePer-page
Severitywarning
Weight2/10

Solution

Invalid links (malformed URLs, javascript: links, or broken references) harm user experience and can indicate code issues. Fix or remove invalid links. Replace javascript:void(0) with proper href values or button elements. Ensure all links have valid URL formats. Check for typos in URLs and verify links work correctly. Remove empty href attributes.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["links/invalid-links"]
squirrel.toml
[rules]
disable = ["links/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["links/invalid-links"]
disable = ["*"]