For better readability, do not put more than one statement on a single line.

Noncompliant Code Example

foo(); bar(); // Noncompliant

Compliant Solution

foo();
bar();

Exceptions

Anonymous functions containing a single statement are ignored. Control flow statements with a single nested statement are ignored as well.

onEvent(function() { doSomething(); });               // Compliant
onEvent(function(p) { doSomething(); return p % 2; }); // Noncompliant

if (condition) doSomething();                         // Compliant
if (condition) { doSomething(); }                     // Compliant