function foo() {
..return "bar";
}80% two spaces vs Tab
Based on 3.1M commits
if (test) {
return false;
}
Use braces with all multi-line blocks
One space before leading brace
var foo = 1,
bar = 2,
baz = 3;
93% vs First Comma
Based on 1.7M commits
function foo() {
return "bar";
}
var item = {};
var superman = {
default: 'clark kent',
private: true
};
63% functions followed by one space
Use literal notation instead of new Object
Don't use reserved words as keys