Skip to content

noAstroConflictingSetDirectives (JavaScript)

biome.json
{
"linter": {
"rules": {
"nursery": {
"noAstroConflictingSetDirectives": "error"
}
}
}
}

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.

<div>{items.map((item) => <span set:html={item.html}>Fallback content</span>)}</div>
<div>{items.map((item) => <span set:html={item.html} />)}</div>