Skip to content

Commit 5fa3e56

Browse files
committed
Moving to ESLint for code formatting rules.
1 parent cbef6d6 commit 5fa3e56

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.eslintrc.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"env": {
3+
"browser": true
4+
},
5+
"extends": "eslint:recommended",
6+
"rules": {
7+
"indent": [
8+
"error",
9+
4
10+
],
11+
"linebreak-style": [
12+
"error",
13+
"unix"
14+
],
15+
"quotes": [
16+
"error",
17+
"single"
18+
],
19+
"semi": [
20+
"error",
21+
"always"
22+
]
23+
}
24+
}

.jshintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
1919
"camelcase" : true, // Force all variable names to use either camelCase style or UPPER_CASE with underscores.
2020
"curly" : true, // Require {} for every new block or scope.
21-
"eqeqeq" : false, // Require triple equals i.e. `===`.
21+
"eqeqeq" : true, // Require triple equals i.e. `===`.
2222
"eqnull" : true, // Tolerate use of `== null`.
2323
"evil" : false, // Tolerate use of `eval`.
2424
"expr" : false, // Tolerate `ExpressionStatement` as Programs.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@
3030
"web audio"
3131
],
3232
"devDependencies": {
33+
"eslint": "^3.3.1",
3334
"grunt": "^0.4.5",
3435
"grunt-contrib-clean": "^0.5.0",
3536
"grunt-contrib-concat": "^0.4.0",
3637
"grunt-contrib-connect": "^0.7.1",
3738
"grunt-contrib-copy": "^0.5.0",
3839
"grunt-contrib-jshint": "^0.9.2",
3940
"grunt-contrib-uglify": "^0.4.0",
41+
"grunt-eslint": "^19.0.0",
4042
"grunt-git": "^0.3.3",
4143
"grunt-jsdoc": "~0.6.2-beta",
4244
"grunt-notify": "^0.3.0",

0 commit comments

Comments
 (0)