Skip to content

Commit aebc7ce

Browse files
committed
Added very basic jshint config
1 parent 114732e commit aebc7ce

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

.jshintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/vendor/*.js

.jshintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"bitwise": true,
3+
"indent": 2,
4+
"quotmark": "single"
5+
}

Gruntfile.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ module.exports = function (grunt) {
2626
]
2727
},
2828

29+
jshint: {
30+
options: {
31+
jshintrc: true
32+
},
33+
code: {
34+
src: ["src/js/**/*.js"]
35+
},
36+
tests: {
37+
src: ["tests/**/*.js"]
38+
}
39+
},
40+
2941
sass: {
3042
dist: {
3143
options: {
@@ -145,6 +157,7 @@ module.exports = function (grunt) {
145157
});
146158

147159
grunt.loadNpmTasks("grunt-contrib-concat")
160+
grunt.loadNpmTasks("grunt-contrib-jshint")
148161
grunt.loadNpmTasks("grunt-contrib-qunit")
149162
grunt.loadNpmTasks("grunt-contrib-requirejs")
150163
grunt.loadNpmTasks("grunt-contrib-uglify")
@@ -156,5 +169,5 @@ module.exports = function (grunt) {
156169

157170
grunt.registerTask("compile", ["requirejs", "sass:dev", "concat"])
158171
grunt.registerTask("minify", ["uglify", "sass:dist"])
159-
grunt.registerTask("test", ["qunit"])
172+
grunt.registerTask("test", ["qunit", "jshint"])
160173
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"grunt": "^0.4.5",
3535
"grunt-cli": "^0.1.13",
3636
"grunt-contrib-concat": "^0.4.0",
37+
"grunt-contrib-jshint": "^0.10.0",
3738
"grunt-contrib-nodeunit": "~0.3.3",
3839
"grunt-contrib-qunit": "~0.4.0",
3940
"grunt-contrib-requirejs": "^0.4.4",

0 commit comments

Comments
 (0)