nursery/noUnusedClasses
nursery · since 2.5.0
No autofix
biome.json
{
"linter": {
"rules": {
"nursery": {
"noUnusedClasses": "error"
}
}
}
}Reports CSS class selectors that are never referenced in any JSX or HTML file.
.unused { color: red; } /* Class "unused" is never referenced */
.used { color: blue; }import "./styles.css";
export default () => <div className="used" />;.button { color: blue; }
.container { padding: 1rem; }import "./styles.css";
export default () => (
<div className="container">
<button className="button">Click</button>
</div>
);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/noUnusedClasses
nursery · since 2.5.0
{
"linter": {
"rules": {
"nursery": {
"noUnusedClasses": "error"
}
}
}
}Require a value for Astro's client:only directive.
Disallow TypeScript type assertions other than const assertions.
Reports custom properties used with var() that have no visible declaration.
Enforce a consistent notation for font weights.