Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277773

Change subject: Add jshint and jsonlint to npm
......................................................................

Add jshint and jsonlint to npm

Change-Id: I1ff79b59f0341ea84a4236cb825478310ddf746c
---
M .jshintrc
A Gruntfile.js
M package.json
3 files changed, 38 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/73/277773/1

diff --git a/.jshintrc b/.jshintrc
index 28fd7a2..763a29f 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -6,7 +6,7 @@
        "curly": true,
        "eqeqeq": true,
        "immed": true,
-       "latedef": true,
+       "latedef": "nofunc",
        "newcap": true,
        "noarg": true,
        "noempty": true,
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+       grunt.initConfig( {
+               jshint: {
+                       options: {
+                               jshintrc: true
+                       },
+                       all: [
+                               '**/*.js',
+                               '!node_modules/**'
+                       ]
+               },
+               banana: {
+                       all: 'i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
index b7c186f..3440a3d 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,9 @@
                "type": "git",
                "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/dash";
        },
+       "scripts": {
+               "test": "grunt test"
+       },
        "dependencies": {
                "amdrequire": "0.0.3",
                "commander": "~2.2.0",
@@ -33,6 +36,10 @@
                "chalk": "^0.5.1",
                "deeply": "^0.1.0",
                "event-stream": "^3.1.7",
+               "grunt": "0.4.5",
+               "grunt-cli": "0.1.13",
+               "grunt-contrib-jshint": "1.0.0",
+               "grunt-jsonlint": "1.0.7",
                "gulp-clean": "^0.3.1",
                "gulp-concat": "^2.4.1",
                "gulp-css-url-adjuster": "^0.2.3",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ff79b59f0341ea84a4236cb825478310ddf746c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

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

Reply via email to