Paladox has uploaded a new change for review.
https://gerrit.wikimedia.org/r/265153
Change subject: Add grunt-contrib-jshint to npm
......................................................................
Add grunt-contrib-jshint to npm
Change-Id: I6bcf5c2b98e918f675181c2fe283416f07cce982
---
M .gitignore
M .jshintignore
M .jshintrc
M Gruntfile.js
M package.json
5 files changed, 39 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth
refs/changes/53/265153/1
diff --git a/.gitignore b/.gitignore
index 4bf4869..455433b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-.svn
*~
*.kate-swp
.*.swp
node_modules/
+vendor/
diff --git a/.jshintignore b/.jshintignore
index 08c5c45..67acedb 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1 +1,3 @@
modules/qrcode.js
+node_modules/**
+vendor/**
diff --git a/.jshintrc b/.jshintrc
index 0967ef4..8a2a10c 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1 +1,23 @@
-{}
+{
+ // Enforcing
+ "bitwise": true,
+ "eqeqeq": true,
+ "freeze": true,
+ "latedef": true,
+ "noarg": true,
+ "nonew": true,
+ "undef": true,
+ "unused": true,
+ "strict": false,
+
+ // Relaxing
+ "es5": false,
+
+ // Environment
+ "browser": true,
+ "jquery": true,
+
+ "globals": {
+ "mediaWiki": false
+ }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 9c56558..3c7f63a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,20 @@
/*jshint node:true */
module.exports = function ( grunt ) {
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.initConfig( {
+ jshint: {
+ options: {
+ jshintrc: true
+ },
+ all: [
+ '**/*.js',
+ '!modules/qrcode.js',
+ '!node_modules/**'
+ ]
+ },
banana: {
all: 'i18n/'
},
@@ -15,6 +26,6 @@
}
} );
- grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};
diff --git a/package.json b/package.json
index 72eb4aa..ba022f1 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
+ "grunt-contrib-jshint": "0.12.0",
"grunt-banana-checker": "0.4.0",
"grunt-jsonlint": "1.0.7"
}
--
To view, visit https://gerrit.wikimedia.org/r/265153
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bcf5c2b98e918f675181c2fe283416f07cce982
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits