Javascript Coding Standards

(Draft, to be continued)

Naming:camelCase, except for CONSTANTS

Indentation rules

  • one space before an opening curly bracket ({)
  • line break after a closing curly bracket (}) (possibly no line break if everything is on the same line)
  • no tabs


XXX explain comment format for documentation generation


  • Don’t forget ‘var’ before variable definition, and semi-colon (‘;’) after each statement.
  • Check the firebug console for deprecation warnings

API usage

  • unless intended, use jQuery(‘container’) rather than jqNode(‘container’)