-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCODING
More file actions
40 lines (28 loc) · 909 Bytes
/
CODING
File metadata and controls
40 lines (28 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#### Steamed Pears Coding standards
This document states the coding standards that all Steamed Pears abide by.
Table of Contents
0.0 General
1.0 HTML
2.0 JavaScript
3.0 CSS
A.0 Proposals
## 0.0 General
80 character line limit
Tabs, not spaces
## 1.0 HTML
Double quotes - <tag attr="blah"></tag>
Lower case
HTML5 Compliance - <br>
Refer to CSS for id and class naming standards
## 2.0 JavaScript
Single quotes - foo('bar')
No spaces before and after attributes within parentheses - function (x) {
Curly braces on their opening line - function() {
Unquoted keys in objects - {foo:'bar'}
Use JSHint
No fancy ExpressJS style comma first continuations
Declare var statements whenever you need a new variable. Not just one var statement per function up top.
## 3.0 CSS
Lower case - this-is-an-id
Use dashes for spaces in classes and ids - .this-is-a-class
## A.0 Proposals