Hoo man has submitted this change and it was merged.

Change subject: JSHint: If you use 'use strict', make sure you actually pass it.
......................................................................


JSHint: If you use 'use strict', make sure you actually pass it.

Someone added "use strict" to AbuseFilter JS files, but it didn't
actually pass in strict mode.

Change-Id: I0cf26b4dacfa88fb40d0595276db65239823763a
---
M modules/ext.abuseFilter.edit.js
M modules/ext.abuseFilter.examine.js
M modules/ext.abuseFilter.tools.js
3 files changed, 28 insertions(+), 6 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  Hoo man: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.abuseFilter.edit.js b/modules/ext.abuseFilter.edit.js
index e49ec2b..967b4b5 100644
--- a/modules/ext.abuseFilter.edit.js
+++ b/modules/ext.abuseFilter.edit.js
@@ -28,9 +28,13 @@
        }
 
        /**
-        * Sends the current filter text to be checked for syntax issues
+        * Sends the current filter text to be checked for syntax issues.
+        *
+        * @context HTMLElement
+        * @param {jQuery.Event} e
         */
        function doSyntaxCheck() {
+               /*jshint validthis:true */
                var filter = $filterBox.val();
 
                $( this )
@@ -123,9 +127,13 @@
        }
 
        /**
-        * Fetches a filter from the API and inserts it into the filter box
+        * Fetches a filter from the API and inserts it into the filter box.
+        *
+        * @context HTMLElement
+        * @param {jQuery.Event} e
         */
        function fetchFilter() {
+               /*jshint validthis:true */
                var filterId = $( '#mw-abusefilter-load-filter' ).val();
 
                if ( filterId === '' ) {
@@ -205,9 +213,13 @@
        }
 
        /**
-        * Called if the filter group (#mw-abusefilter-edit-group-input) is 
changed
+        * Called if the filter group (#mw-abusefilter-edit-group-input) is 
changed.
+        *
+        * @context HTMLELement
+        * @param {jQuery.Event} e
         */
        function onFilterGroupChange() {
+               /*jshint validthis:true */
                var newVal = mw.config.get( 
'wgAbuseFilterDefaultWarningMessage' )[$( this ).val()];
 
                if ( !$( '#mw-abusefilter-action-warn-checkbox' ).is( 
':checked' ) ) {
diff --git a/modules/ext.abuseFilter.examine.js 
b/modules/ext.abuseFilter.examine.js
index 1d6c21a..6b4b87a 100644
--- a/modules/ext.abuseFilter.examine.js
+++ b/modules/ext.abuseFilter.examine.js
@@ -13,9 +13,13 @@
        var $syntaxResult;
 
        /**
-        * Tests the filter against an rc event or abuse log entry
+        * Tests the filter against an rc event or abuse log entry.
+        *
+        * @context HTMLElement
+        * @param {jQuery.Event} e
         */
        function examinerTestFilter() {
+               /*jshint validthis:true */
                var filter = $( '#wpTestFilter' ).val(),
                        examine = mw.config.get( 'abuseFilterExamine' ),
                        params = {
diff --git a/modules/ext.abuseFilter.tools.js b/modules/ext.abuseFilter.tools.js
index 99084df..f47b5fc 100644
--- a/modules/ext.abuseFilter.tools.js
+++ b/modules/ext.abuseFilter.tools.js
@@ -9,9 +9,12 @@
        'use strict';
 
        /**
-        * Submits the expression to be evaluated
+        * Submits the expression to be evaluated.
+        * @context HTMLElement
+        * @param {jQuery.Event} e
         */
        function doExprSubmit() {
+               /*jshint validthis:true */
                var expr = $( '#wpTestExpr' ).val();
                $( this ).injectSpinner( 'abusefilter-expr' );
 
@@ -35,9 +38,12 @@
        }
 
        /**
-        * Submits a call to reautoconfirm a user
+        * Submits a call to reautoconfirm a user.
+        * @context HTMLElement
+        * @param {jQuery.Event} e
         */
        function doReautoSubmit() {
+               /*jshint validthis:true */
                var name = $( '#reautoconfirm-user' ).val();
 
                if ( name === '' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cf26b4dacfa88fb40d0595276db65239823763a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to