Invalid Links
Detects invalid link formats on the page
Detects invalid link formats on the page
| Rule ID | links/invalid-links |
| Category | Links |
| Scope | Per-page |
| Severity | warning |
| Weight | 2/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
toml[rules]
disable = ["links/invalid-links"]Disable all Links rules
squirrel.toml
toml[rules]
disable = ["links/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["links/invalid-links"]
disable = ["*"]