I'm definitely in favour of having a JS coding standard as well - preferably an industry standard rather than trying to duplicate the PHP guidelines.
http://jscs.info/overview has a list of common presets (and the tool itself might be useful for checking and autoformatting). As far as I know, AirBNB and Google are the most commonly used presets. It might also be worth having a consistent way of creating DOM elements - either a consistent way of doing it in jQuery or a consistently used template engine. For example, Bootstrap has a reasonably nice pure- jQuery style - see https://github.com/twbs/bootstrap/blob/cf3f8e0d580888ec9459270ed67dc86c13f5b41a/js/tooltip.js#L37 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1576074 Title: Adopt PSR-2 for our PHP code format Status in Mahara: Confirmed Bug description: Currently Mahara has its own idiosyncratic code formatting guidelines: https://wiki.mahara.org/wiki/Developer_Area/Coding_guidelines It would make things easier for new devs, and improve tool support, if we switched to the industry standard PSR-2: http://www.php- fig.org/psr/psr-2/ It would also be good to decide on a Javascript coding standard. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1576074/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

