astro/no-deprecated-astro-canonicalurl
disallow using deprecated
Astro.canonicalURL
- ⚙ This rule is included in
"plugin:astro/recommended"
.
📖 Rule Details
This rule reports use of deprecated Astro.canonicalURL
.
---
/* eslint astro/no-deprecated-astro-canonicalurl: "error" */
/* ✓ GOOD */
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
/* ✗ BAD */
const canonicalURL = Astro.canonicalURL;
---
{canonicalURL}
🔧 Options
Nothing.
📚 Further Reading
- Astro Documentation | Migration Guide > Astro 1.0 Release Candidate - Deprecated:
Astro.canonicalURL
🚀 Version
This rule was introduced in eslint-plugin-astro v0.16.0
🔍 Implementation
Edit this page
Back
← astro/no-conflict-set-directives Next Page
astro/no-deprecated-astro-fetchcontent →
← astro/no-conflict-set-directives Next Page
astro/no-deprecated-astro-fetchcontent →