- Follow Google Code Style Guide
- Use MDN documentation
- Use jswiki as guide to JS libraries
- Use
"use strict";everywhere - Make custom errors right
- Introduce library whenever it's possible
- Use right blocks style
- Avoid any kind of init() calls in constructor
- Remove listeners and do further cleanup
- Don't use
for (var k in arr)for iterating arrays - Use polyfills, but with care
catch(err)doesn't needvar err;- Use
err(noterrororexc) for error variables - Know about harmony - it is already partially available in browsers and node
- Use Object.defineProperty() when available (not
__defineGetter__/__defineSetter__) - Never us
this.constructor.super_to access superclass
- Use project template
- Properly use require and exports in your modules
- Use async
- And other useful modules
- Use
path.join() - Don't write "for node.js" in package.json description
- Do write "for node.js" in description on github
- You can use harmony in node (partially for now)