Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 530 Bytes

STYLE.md

File metadata and controls

30 lines (24 loc) · 530 Bytes

Style

Code style is StandardJS. npm run lint validates.

Conditionals and loops always use an indented explicit block.

if (options.verbose) {
  console.log('Processing list')
}

while (list.length) {
  process(list.pop())
}

Switch cases are always multiline.

switch (variable.type) {
  case 'boolean':
    return VariableType.Boolean
  case 'json':
    return VariableType.Json
  case 'number':
    return VariableType.Number
  case 'string':
    return VariableType.String
}