@@ -47,6 +47,89 @@ We welcome code contributions and participation in bug fixes and issues.
47
47
- Verify that dependencies are listed in manifest
48
48
- Features must include test coverage and code review to be accepted
49
49
50
+ #### Style guidelines
51
+ ##### Javascript
52
+ We follow [ Javascript Standard Style] ( https://github.com/feross/standard#rules ) .
53
+
54
+ ##### Other
55
+ - ** Indents are 2 spaces; no tab characters** (unless required by the language).
56
+ <table >
57
+ <tr ><th >Not OK</th ><th >OK</th ></tr >
58
+ <tr ><td ><pre lang =" html " >
59
+ < ; html> ;
60
+   ; < ; head> ;< ; /head> ;
61
+   ; < ; body> ;
62
+   ; < ; div> ; Hello world< ; /div> ;
63
+   ; < ; /body> ;
64
+ < ; /html> ;
65
+ </pre ></td >
66
+ <td ><pre lang =" html " >
67
+ < ; html> ;
68
+   ; < ; head> ;< ; /head> ;
69
+   ; < ; body> ;
70
+   ; < ; div> ; Hello world< ; /div> ;
71
+   ; < ; /body> ;
72
+ < ; /html> ;
73
+ </pre ></td ></tr >
74
+ </table >
75
+
76
+
77
+ - ** Non-binary files must end with a new-line character.**
78
+ <table >
79
+ <tr ><th >Not OK</th ><th >OK</th ></tr >
80
+ <tr ><td ><img src =" https://cloud.githubusercontent.com/assets/9868643/10029550/5f7d2a8e-6127-11e5-85bd-e59e6a048f2a.png " alt =" Missing new-line character " width =" 200 " ></td >
81
+ <td ><img src =" https://cloud.githubusercontent.com/assets/9868643/10029556/6750fbfa-6127-11e5-8283-85124cc119dd.png " alt =" New-line character " width =" 200 " ></td ></tr >
82
+ </table >
83
+
84
+
85
+ - ** No trailing whitespace** (unless required by the language).
86
+ <table >
87
+ <tr ><th >Not OK</th ><th >OK</th ></tr >
88
+ <tr ><td ><img src =" https://cloud.githubusercontent.com/assets/9868643/10030416/6ead5010-612c-11e5-9093-f96e32ca53af.png " alt =" Trailing whitespace " width =" 225 " ></td >
89
+ <td ><img src =" https://cloud.githubusercontent.com/assets/9868643/10030415/6dad6470-612c-11e5-89a7-607fe49620f4.png " alt =" No trailing whitespace " width =" 225 " ></td ></tr >
90
+ </table >
91
+
92
+ - ** Avoid excess whitespace around code.**
93
+ <table >
94
+ <tr ><th >Not OK</th ><th >OK</th ></tr >
95
+ <tr ><td ><code >identifier( param,   ;   ;   ; param )</code ></td >
96
+ <td ><code >identifier(param, param)</code ></td ></tr >
97
+ <tr ><td ><pre lang =" yaml " >
98
+ prop: value
99
+ prop1: value
100
+ prop1a: value
101
+ </pre ></td >
102
+ <td ><pre lang =" yaml " >
103
+ prop: value
104
+ prop1: value
105
+ prop1a: value
106
+ </pre ></td ></tr >
107
+ </table >
108
+ - ** No more than one empty line at a time.**
109
+ <table >
110
+ <tr ><th >Not OK</th ><th >OK</th ></tr >
111
+ <tr ><td >
112
+ <pre lang =" css " >
113
+ /* Special Classes */
114
+ .fancy { ... }
115
+ .jumbotron { ... }
116
+
117
+
118
+ /* Other Classes */
119
+ .floaty-boaty { ... }
120
+ </pre >
121
+ </td >
122
+ <td >
123
+ <pre lang =" css " >
124
+ /* Special Classes */
125
+ .fancy { ... }
126
+ .jumbotron { ... }
127
+
128
+ /* Other Classes */
129
+ .floaty-boaty { ... }
130
+ </pre >
131
+ </td ></tr >
132
+ </table >
50
133
51
134
### How to submit new code:
52
135
0 commit comments