From c6e0dd166b9ecbb0519008cbccbc332c1c59c557 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 21 Apr 2017 17:59:56 +0200 Subject: [PATCH] build: add grunt-contrib-jshint See T119973 Change-Id: If6ac925b21703585625bb2556c5712bf6d9e016c --- Gruntfile.js | 10 +++++++++- package.json | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 5a87e7b..e4033e5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,10 +2,18 @@ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); var conf = grunt.file.readJSON( 'extension.json' ); grunt.initConfig( { banana: conf.MessagesDirs, + jshint: { + all: [ + '**/*.js', + '!node_modules/**', + '!vendor/**' + ] + }, jsonlint: { all: [ '**/*.json', @@ -14,6 +22,6 @@ module.exports = function ( grunt ) { } } ); - grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index 72eb4aa..8848a18 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ }, "devDependencies": { "grunt": "0.4.5", - "grunt-cli": "0.1.13", "grunt-banana-checker": "0.4.0", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "1.1.0", "grunt-jsonlint": "1.0.7" } }