Add jshint to npm

Add jshint to gruntfile.js

Change-Id: I1b741215dd04db9dded330dbbd3ba901e20566d1
This commit is contained in:
paladox
2015-08-02 17:22:31 +00:00
committed by Hashar
parent 4a14ba325f
commit b436eab7af
2 changed files with 11 additions and 1 deletions

View File

@@ -1,10 +1,19 @@
/*jshint node:true */ /*jshint node:true */
module.exports = function ( grunt ) { module.exports = function ( grunt ) {
'use strict'; 'use strict';
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.initConfig( { grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
all: [
'*.js'
]
},
banana: { banana: {
all: 'i18n/' all: 'i18n/'
}, },
@@ -16,6 +25,6 @@ module.exports = function ( grunt ) {
} }
} ); } );
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' ); grunt.registerTask( 'default', 'test' );
}; };

View File

@@ -6,6 +6,7 @@
"devDependencies": { "devDependencies": {
"grunt": "0.4.5", "grunt": "0.4.5",
"grunt-cli": "0.1.13", "grunt-cli": "0.1.13",
"grunt-contrib-jshint": "0.11.2",
"grunt-banana-checker": "0.2.2", "grunt-banana-checker": "0.2.2",
"grunt-jsonlint": "1.0.4" "grunt-jsonlint": "1.0.4"
} }