Archive for the ‘Coding Conventions’ Category
JsHint
Ken brought my attention to this in July 2012. More in line with MS coding standards and assumes jQuery.
Douglas Crockford JavaScript coding conventions
Link to coding conventions: http://javascript.crockford.com/code.html
List of headings at the coding conventions site:
- JavaScript files
- Indentation
- Line Length
- Comments
- Variable Declarations
- Function Declarations
- Names
- Statements
- Simple Statements
- Compound Statements
- Labels
- return Statement
- if Statement
- for Statement
- while Statement
- do Statement
- switch Statement
- try Statement
- continue Statement
- with Statement
- White-space
- Bonus Suggestions
- {} and []
- , (comma) Operator
- Block Scope
- Assignment Expressions
- === and !== Operators
- Confusing Pluses and Minuses
- eval is Evil
Leave a comment