Coding Convention - nodejskr/vamfire GitHub Wiki

1. 4 spaces for indentation

// . <- is space
function foo() {
....if (true) {
........return true;
....}
}

2. Braces start with start line and one space.

function a() {
}

3. Multiple variables must be defined with the last comma and no space.

var abc = 1,
    xyz = 'one',
    isTrue = true;

4. Object definition Followed by after space.

var obj = {
    foo: 3,
    bar: 4,
    baz: 5
};

5. Wrap the string using single quotes

var str = 'with single quote';

※ Read the '/convention.js'