--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: booleanOperators2.js --- # Input ```jsx function booleanOperators2() { if (a // +1 for `if` && // +1 !(b && c)) { // +1 return true; } } ``` # Diagnostics ``` booleanOperators2.js:1:10 lint/complexity/noExcessiveCognitiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. > 1 │ function booleanOperators2() { │ ^^^^^^^^^^^^^^^^^ 2 │ if (a // +1 for `if` 3 │ && // +1 i Please refactor this function to reduce its complexity score from 3 to the max allowed complexity 2. ```