doc/dev/coding_standards_js.rst
author Denis Laxalde <denis.laxalde@logilab.fr>
Tue, 06 Aug 2019 16:36:21 +0200
branch3.26
changeset 12721 1b4e32301f14
parent 12443 47f85e75d214
permissions -rw-r--r--
Added tag debian/3.26.14-1, 3.26.14 for changeset 172f683a84f6

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


Documentation
~~~~~~~~~~~~~
XXX explain comment format for documentation generation


Coding
~~~~~~
- 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')


See also
~~~~~~~~
http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml