nursery/noMisplacedListElements
nursery · since 2.5.15
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"noMisplacedListElements": "error"
}
}
}
}Require <li> elements with an HTML element parent to be children of <ul>, <ol>, or <menu>.
<div><li>Item</li></div><ul><div><li /></div></ul><div>{items.map((item) => <li key={item}>{item}</li>)}</div><>
<ul><li>Item</li></ul>
<ol><li>Item</li></ol>
<menu><li /></menu>
</><ul>{items.map((item) => <li key={item}>{item}</li>)}</ul><li>Item rendered in a list elsewhere</li>Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/noMisplacedListElements
nursery · since 2.5.15
{
"linter": {
"rules": {
"nursery": {
"noMisplacedListElements": "error"
}
}
}
}Disallow shorthand assign when variable appears on both sides.
Disallow unsafe JSON values that may cause interoperability issues.
Require var() when using a declared CSS custom property.
Checks that the initial-value of an @property rule follows the value format declared by its syntax.