For better readability, do not put more than one statement on a single line.
foo(); bar(); // Noncompliant
foo(); bar();
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