jenkins-bot has submitted this change and it was merged.

Change subject: Add jshint to 'npm test' command
......................................................................


Add jshint to 'npm test' command

Bug: T63640
Change-Id: Ibae36050a1d8054b7280804513a258bc7cd8960f
---
M Gruntfile.js
M package.json
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index 1cc437d..fc81769 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,6 +7,7 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
        grunt.loadNpmTasks( 'grunt-banana-checker' );
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
        grunt.loadNpmTasks( 'grunt-jsonlint' );
 
        var conf = grunt.file.readJSON( 'extension.json' );
@@ -17,9 +18,15 @@
                                '**/*.json',
                                '!node_modules/**'
                        ]
+               },
+               jshint: {
+                       all: [
+                               '**/*.js',
+                               '!node_modules/**'
+                       ]
                }
        } );
 
-       grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
        grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index c4e5c91..a8b533c 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
     "grunt": "0.4.5",
     "grunt-cli": "0.1.13",
     "grunt-banana-checker": "0.4.0",
+    "grunt-contrib-jshint": "0.11.3",
     "grunt-jsonlint": "1.0.7"
   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/262712
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibae36050a1d8054b7280804513a258bc7cd8960f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to