astro/no-conflict-set-directives
disallow conflicting set directives and child contents
- ⚙ This rule is included in
"plugin:astro/recommended"
.
📖 Rule Details
This rule reports conflicting set:text
, set:html
, and child content.
---
/* eslint astro/no-conflict-set-directives: "error" */
const foo = "hello"
---
{/* ✓ GOOD */}
<p>{foo}</p>
<p set:text={foo}></p>
<p set:html={foo}></p>
{/* ✗ BAD */}
<p set:text={foo}>!</p>
<p set:html={foo}>!</p>
🔧 Options
Nothing.
📚 Further Reading
- Astro Documentation | Template Directives Reference > set:html
- Astro Documentation | Template Directives Reference > set:text
🚀 Version
This rule was introduced in eslint-plugin-astro v0.7.0
🔍 Implementation
Edit this page
Back
← astro/missing-client-only-directive-value Next Page
astro/no-deprecated-astro-canonicalurl →
← astro/missing-client-only-directive-value Next Page
astro/no-deprecated-astro-canonicalurl →