nursery/useLayeredStyles
nursery · since 2.5.13
No autofix
biome.json
{
"linter": {
"rules": {
"nursery": {
"useLayeredStyles": "error"
}
}
}
}.my-style {
color: red;
}@media (min-width: 600px) {
.my-style {
color: red;
}
}@import "foo.css";@layer {
.my-style {
color: red;
}
}@layer base {
.my-style {
color: red;
}
}@layer base {
@media (min-width: 600px) {
.my-style {
color: red;
}
}
}Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useLayeredStyles
nursery · since 2.5.13
{
"linter": {
"rules": {
"nursery": {
"useLayeredStyles": "error"
}
}
}
}Enforces the use of with { type: "json" } for JSON module imports.
Prefer logical CSS properties over physical properties.
Detects a disposable object assigned to a variable without using or await using syntax.
Require a valid deletion date on the @deprecated directive.