nursery/useBiomeKindSets
nursery · since 2.6.9
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useBiomeKindSets": "error"
}
}
}
}Require kind sets instead of comparing kind names one by one in Biome JS plugins.
if (node.kind === "JS_CALL_EXPRESSION" || node.kind === "JS_NEW_EXPRESSION") {}if (token.kind !== "EQ2" && token.kind !== "NEQ") {}const CALLS = ["JS_CALL_EXPRESSION", "JS_NEW_EXPRESSION"];
if (CALLS.includes(node.kind)) {}import { nodeKinds } from "@biomejs/runtime/plugin";
const CALLS = nodeKinds("JS_CALL_EXPRESSION", "JS_NEW_EXPRESSION");
if (CALLS.has(node)) {}
if (node.kind === "JS_CALL_EXPRESSION") {}
const language = context.sourceType.language;
if (language.kind === "javascript" || language.kind === "typescript") {}Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useBiomeKindSets
nursery · since 2.6.9
{
"linter": {
"rules": {
"nursery": {
"useBiomeKindSets": "error"
}
}
}
}Prefer folder exclusions that prevent Biome from scanning the folder.
Require kind sets in Biome JS plugins to be created at the top level of the module.
Enforce JSON keys with consistent Unicode representation.
Require a reason when using the @deprecated directive.