no-needless-boolean-branch Disallow conditionals that only produce opposite boolean literals An if or ternary whose branches produce opposite boolean literals has the same result as its condition or its negation. Instead, you SHOULD use the condition directly or negate it when the branches reverse the result. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function active(condition: boolean): boolean { if (condition) { return true; } else { return false; } } Accepted function active(condition: boolean): boolean { return condition; } Prior art - Clippy · needlessbool - ESLint · no-unneeded-ternary language/linter/src/rules/style/noneedlessbooleanbranch.rs:8