noAstroConflictingSetDirectives (JavaScript)
Summary
Section titled “Summary”- Rule available since:
v2.5.15 - Diagnostic Category:
lint/nursery/noAstroConflictingSetDirectives - This rule doesn’t have a fix.
- The default severity of this rule is error.
- This rule belongs to the following domains:
- Sources:
- Same as
astro/no-conflict-set-directives
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noAstroConflictingSetDirectives": "error" } } }}Description
Section titled “Description”Disallow conflicting content sources on Astro elements.
The set:html and set:text directives replace an element’s child content.
Combining either directive with another content source makes it unclear which
content should be rendered.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<div>{items.map((item) => <span set:html={item.html}>Fallback content</span>)}</div><div>{items.map((item) => <span set:html={item.html} />)}</div>References
Section titled “References”Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.