doc/coding_standards_js.rst
branchstable
changeset 6049 f0ae98fa85a1
equal deleted inserted replaced
6048:4695b1ee58a0 6049:f0ae98fa85a1
       
     1 Javascript Coding Standards
       
     2 ---------------------------
       
     3 
       
     4 (Draft, to be continued)
       
     5 
       
     6 :Naming: camelCase, except for CONSTANTS
       
     7 
       
     8 Indentation rules
       
     9 ~~~~~~~~~~~~~~~~~
       
    10 - espace avant accolade ouvrante
       
    11 
       
    12 - retour à la ligne après accolade ouvrante (éventuellement pas
       
    13   de retour à la ligne s'il y a tout sur la même ligne, mais ce n'est
       
    14   pas le cas ici.
       
    15 
       
    16 - no tabs
       
    17 
       
    18 
       
    19 Documentation
       
    20 ~~~~~~~~~~~~~
       
    21 XXX explain comment format for documentation generation
       
    22 
       
    23 
       
    24 Coding
       
    25 ~~~~~~
       
    26 - Don't forget 'var' before variable definition, and semi-colon (';') after **each** statement.
       
    27 - Check the firebug console for deprecation warnings
       
    28 
       
    29 
       
    30 API usage
       
    31 ~~~~~~~~~
       
    32 - unless intended, use jQuery('container') rather than jqNode('container')
       
    33 
       
    34 
       
    35 See also
       
    36 ~~~~~~~~
       
    37 http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml