if-newline

September 27, 2023 ยท View on GitHub

Enforce line breaks between if statements and their consequent / alternate expressions. Only applicable for inline if statements.

Rule Details

// ๐Ÿ‘Ž bad
if (foo) bar()
// ๐Ÿ‘ good
if (foo)
  bar()