Commit 3746529d authored by Sindre Sorhus's avatar Sindre Sorhus

Contributing.md code style - add strict mode

parent aff4ddba
...@@ -8,6 +8,7 @@ We're happy to accept contributions in the form of new apps, bug fixes, issues, ...@@ -8,6 +8,7 @@ We're happy to accept contributions in the form of new apps, bug fixes, issues,
- Tab indentation - Tab indentation
- Single-quotes - Single-quotes
- Semicolon - Semicolon
- Strict mode
- No trailing whitespace - No trailing whitespace
- Variables at the top of the scope - Variables at the top of the scope
- Multiple variable statements - Multiple variable statements
...@@ -19,6 +20,8 @@ We're happy to accept contributions in the form of new apps, bug fixes, issues, ...@@ -19,6 +20,8 @@ We're happy to accept contributions in the form of new apps, bug fixes, issues,
Example: Example:
```js ```js
'use strict';
function foo(bar, fum) { function foo(bar, fum) {
var i, l, ret; var i, l, ret;
var hello = 'Hello'; var hello = 'Hello';
...@@ -29,7 +32,7 @@ function foo(bar, fum) { ...@@ -29,7 +32,7 @@ function foo(bar, fum) {
for (i = 0, l = bar.length; i < l; i++) { for (i = 0, l = bar.length; i < l; i++) {
if (bar[i] === hello) { if (bar[i] === hello) {
ret = fum(out); ret += fum(bar[i]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment