chore: update css rules, add hct plugin
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Unused tokens: defined in preview.css but never referenced via var()
|
||||
// anywhere in src. A dead token is not the single source of truth — it's dust.
|
||||
// Reported as a warning; it does not fail the run.
|
||||
|
||||
import { collectUsedTokens } from "./helpers.mjs";
|
||||
|
||||
export function checkUnused(root) {
|
||||
const defined = new Set();
|
||||
root.walkDecls((decl) => {
|
||||
if (decl.prop.startsWith("--")) defined.add(decl.prop);
|
||||
});
|
||||
const used = collectUsedTokens();
|
||||
return [...defined].filter((token) => !used.has(token));
|
||||
}
|
||||
Reference in New Issue
Block a user