complexity/useSimplifiedLogicExpression
complexity · since 1.0.0
Safe autofix
biome.json
{
"linter": {
"rules": {
"complexity": {
"useSimplifiedLogicExpression": "error"
}
}
}
}const boolExp = true;
const r = true && boolExp;const boolExp2 = true;
const r2 = false || boolExp2;const boolExp3 = true;
if (boolExp3 || false) {
doSomething();
}const boolExpr3 = true;
const boolExpr4 = false;
const r5 = !(boolExpr1 && boolExpr2);
const boolExpr5 = true;
const boolExpr6 = false;const value = undefined;
const r6 = value || false;Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
complexity/useSimplifiedLogicExpression
complexity · since 1.0.0
{
"linter": {
"rules": {
"complexity": {
"useSimplifiedLogicExpression": "error"
}
}
}
}Use static Response methods instead of new Response() constructor when possible.
Enforce the sorting of Tailwind CSS classes.
Require one executable GraphQL definition per file.
Require regex literals to be declared at the top level.