Use underscores ('snake case') for variable names
...for function names
...and for method names
Use CamelCase ('CapWords') for class names
Use initial underscore to mark "private" methods and attribute in classes
Always use parentheses around function calls
i.e., don't do this:
Always use parenthesis when defining a function:
Even if there are no arguments:
For inline functions definitions, use 4 spaces before the start of the function definition and 2 spaces before the comma separating function arguments:
Always return something, or null (do not rely on CoffeeScript's implicit return value)
don't do this:
OK to omit braces for object literals that are standalone
In function calls, prefer to put braces around object literals
Note: object literals in function calls which do NOT fit in one line can be tricky. This won't compile:
foo({'name': 'firstobject',
'title': 'first'})
Coffeescript Style Guide for BokehJS