Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

Talk:Javascript/Coding Style: Difference between revisions

From MoodleDocs
Damyon Wiese (talk | contribs)
Created page with "Thankyou Andrew for working on this - it is sorely needed. Some points I think we need voting/consensus on: "Contrary to the standard Moodle coding style, we prefer to use c..."
 
No edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Thankyou Andrew for working on this - it is sorely needed.
<p class="note">Note: Please avoid using this talk page to propose changes to the coding style. Instead file a coding style bug. See the forum discussion [http://moodle.org/mod/forum/discuss.php?d=202406 Using Moodle: Proposing changes to moodle coding style] for more details.</p>
 
Some points I think we need voting/consensus on:
 
"Contrary to the standard Moodle coding style, we prefer to use camelCase for JavaScript."
 
"be spread across multiple lines for complex types (including all
objects and arrays, no matter how simple"
 
We could be more specific about which yuidoc tags are required (Where is @namespace required?)
 
with a maximum length of 150
 
"In the case of object property assignation, there should be a space after the colon, but not before."
 
Some instructions on how to use YUIdoc / shifter to check the format of the JS/comments would be welcomed.

Latest revision as of 08:18, 29 July 2016

Note: Please avoid using this talk page to propose changes to the coding style. Instead file a coding style bug. See the forum discussion Using Moodle: Proposing changes to moodle coding style for more details.