JavaScript Coding Standards

JavaScript Coding Standards

Posted by stella on Mon, 2008-05-19 17:08 in

More and more contributed modules in Drupal are including JavaScript files, so I want to add the ability to review JavaScript files to the Coder module. However, in order to do that there needs to be agreement on what coding standards we should be using for JavaScript.

At present, there's the Coding standards for JS files doc which has one or two ideas but isn't complete. There's also the main Coding Standards doc, and while most are transferable to JavaScript, not all are. So I've put some suggestions together at http://drupal.org/node/260140 A fair few of them come from the standards used by JSLint so there shouldn't be many surprises. I'd really appreciate a discussion/debate on this and hopefully we can agree on the coding standards we want to use in Drupal.

great blog

great blog

Posted by santa (not verified) on Mon, 2012-03-26 11:48
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options