- 4 space soft tab
- Always use braces for conditionals/loops
- Opening brace follows conditional/loop closing paren,
else
is on same line - No leading comma
- Always trailing comma (for array and object literals)
gulp
var
declarations must be made before anything else within a given scopevar varFunction = function () {}
<- space between paren and bracefunction namedFunction() {}
<- no space between paren and braceif (condition) {
<- space betweenif
and parencalledFunction()
<- no space between function name and paren- functions intended to be instantiated with
new
must be capitalized. Instances are camelCase. "
double quotes for strings- concatenation operator must lead a new line
- Chained functions with callbacks should have closing brace/paren at left-most possible indentation
- Leftmost semicolon to avoid trailing indentation.
"use strict"
, I guess
Created
September 12, 2014 14:17
-
-
Save ajcrites/a480d629e4af411fb541 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment