Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 280 Bytes

no-collapsible-if.md

File metadata and controls

21 lines (16 loc) · 280 Bytes

no-collapsible-if

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if (x != undefined) {
  if (y === 2) {
    // ...
  }
}

Compliant Solution

if (x != undefined && y === 2) {
  // ...
}