forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 4
Code Standards
Hannah Wolfe edited this page May 5, 2013
·
5 revisions
[Work in progress]
Good, clear and consistent code styles are pivotal in the success of any software project. Good use of style can reduce errors, consistency will enable us to work together efficiently. As there is an element of personal preference in style, I am certain that some people will not be happy with the code standards I've put into place. If this is the case for you, I ask that you take half an hour to listen to the first half of Crockford on JavaScript - Section 8: Programming Style & Your Brain to help understand why I've made these choices.
- JSLint is King (see JSLint section below).
- Use strict mode
- Protect the global scope
- Indent with 4 spaces
- Max line lenght 120
- Use unix line endings