Grunny has uploaded a new change for review.

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

Change subject: Make Nuke pass jshint
......................................................................

Make Nuke pass jshint

Adds a basic .jshintrc based on the common settings from the coding
conventions page and removes unused variable mw.

Bug: 61616
Change-Id: I579f0528c3c57de46449457087f441c88229379b
---
M .gitignore
A .jshintrc
M ext.nuke.js
3 files changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke 
refs/changes/43/124143/1

diff --git a/.gitignore b/.gitignore
index 9ab99ba..3087d84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 
 !.gitignore
 !.gitreview
+!.jshintrc
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..f274a67
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,25 @@
+{
+       "predef": [
+               "jQuery"
+       ],
+
+       /* Common */
+
+       // Enforcing
+       "camelcase": true,
+       "curly": true,
+       "eqeqeq": true,
+       "immed": true,
+       "latedef": true,
+       "newcap": true,
+       "noarg": true,
+       "noempty": true,
+       "nonew": true,
+       "quotmark": "single",
+       "trailing": true,
+       "undef": true,
+       "unused": true,
+
+       // Environment
+       "browser": true
+}
diff --git a/ext.nuke.js b/ext.nuke.js
index 82a961d..42f463f 100644
--- a/ext.nuke.js
+++ b/ext.nuke.js
@@ -6,7 +6,7 @@
  * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
  */
 
-( function ( $, mw ) {
+( function ( $ ) {
        'use strict';
 
        $( document ).ready( function () {
@@ -22,4 +22,4 @@
                        selectPages( false );
                } );
        } );
-} ) ( window.jQuery, window.mediaWiki );
+}( jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I579f0528c3c57de46449457087f441c88229379b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Grunny <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to