I’ve recently been contributing to a set of front-end standards for Sapient, you can see the results at bp.sapient-lab.com. It’s a working document that will hopefully evolve over time.
- Namespace your code with a closure
- Pass libraries into your closure to ensure your references
- Use the right pattern for your code, if it’s not an object don’t write it as one
- Write comments!