[doc] started js/css coding standards stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 02 Aug 2010 10:09:29 +0200
branchstable
changeset 6049 f0ae98fa85a1
parent 6048 4695b1ee58a0
child 6050 20af96a6fffc
[doc] started js/css coding standards
doc/coding_standards_css.rst
doc/coding_standards_js.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/coding_standards_css.rst	Mon Aug 02 10:09:29 2010 +0200
@@ -0,0 +1,33 @@
+CSS Coding Standards
+--------------------
+
+(Draft, to be continued)
+
+:Naming: camelCase
+
+Indentation rules
+~~~~~~~~~~~~~~~~~
+- 2 espaces avant les propriétés
+
+- pas d'espace avant les ":", un espace après
+
+- 1 seul espace entre les différentes valeurs pour une même propriété
+
+
+Documentation
+~~~~~~~~~~~~~
+Please keep rules semantically linked grouped together, with a comment about
+what they are for.
+
+Recommendation
+~~~~~~~~~~~~~~
+- Try to use existing classes rather than introduce new ones
+
+- Keep things as simple as possible while in the framework
+
+- Think about later customization by application
+
+- Avoid introducing a new CSS file for a few lines of CSS, at least while the
+  framework doesn't include packing functionalities
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/coding_standards_js.rst	Mon Aug 02 10:09:29 2010 +0200
@@ -0,0 +1,37 @@
+Javascript Coding Standards
+---------------------------
+
+(Draft, to be continued)
+
+:Naming: camelCase, except for CONSTANTS
+
+Indentation rules
+~~~~~~~~~~~~~~~~~
+- espace avant accolade ouvrante
+
+- retour à la ligne après accolade ouvrante (éventuellement pas
+  de retour à la ligne s'il y a tout sur la même ligne, mais ce n'est
+  pas le cas ici.
+
+- 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
\ No newline at end of file