Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit b4e714b

Browse files
committed
Build: Add jscs for checking any js files for style
1 parent 8ef5494 commit b4e714b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.jscsrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "jquery"
3+
}

Gruntfile.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = function( grunt ) {
22

33
grunt.loadNpmTasks( "grunt-contrib-jshint" );
44
grunt.loadNpmTasks( "grunt-html" );
5+
grunt.loadNpmTasks( "grunt-jscs" );
56

67
grunt.initConfig({
78
jshint: {
@@ -10,8 +11,8 @@ grunt.initConfig({
1011
jshintrc: ".jshintrc"
1112
}
1213
},
13-
htmllint: {
14-
all: [ "*.html", "demos/*.html" ]
14+
jscs: {
15+
all: [ "*.js" ]
1516
}
1617
});
1718

@@ -32,6 +33,6 @@ grunt.registerTask( "update-authors", function() {
3233
});
3334
});
3435

35-
grunt.registerTask( "default", "jshint", "htmllint" );
36+
grunt.registerTask( "default", [ "jshint", "jscs" ] );
3637

3738
};

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"commitplease": "2.0.0",
4242
"grunt": "0.4.2",
4343
"grunt-contrib-jshint": "0.10.0",
44-
"grunt-git-authors": "2.0.0"
44+
"grunt-git-authors": "2.0.0",
45+
"grunt-jscs": "0.6.2"
4546
},
4647
"keywords": []
4748
}

0 commit comments

Comments
 (0)