-
Notifications
You must be signed in to change notification settings - Fork 6
Style Guide
Charmander edited this page Mar 28, 2014
·
1 revision
-
Wrap code where appropriate, but don’t wrap specifically at any number of characters, unless writing Markdown or plain text.
-
Indent using tabs and align using spaces.
-
Prefer indentation to alignment.
-
Trailing spaces are strictly prohibited.
-
Consult
jshint .
before committing. -
Declare functions as
function foo() {}
, rather thanvar foo = function () {};
. -
Don’t use multiple declaration.
-
Trailing commas, please.
-
Name functions when appropriate.
-
Use trailing commas when appropriate.
-
Use promises instead of callbacks when appropriate.
- Put properties in alphabetical order.