build: Update eslint-config-wikimedia to 0.11.0
authorEd Sanders <esanders@wikimedia.org>
Wed, 20 Feb 2019 22:53:09 +0000 (22:53 +0000)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 20 Feb 2019 23:36:03 +0000 (23:36 +0000)
Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b

42 files changed:
.eslintrc.json
mw-config/config.js
package.json
resources/src/jquery.tablesorter/jquery.tablesorter.js
resources/src/mediawiki.Uri/Uri.js
resources/src/mediawiki.action/mediawiki.action.edit.preview.js
resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js
resources/src/mediawiki.api/index.js
resources/src/mediawiki.api/upload.js
resources/src/mediawiki.debug/debug.js
resources/src/mediawiki.htmlform.checker.js
resources/src/mediawiki.inspect.js
resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
resources/src/mediawiki.legacy/protect.js
resources/src/mediawiki.notification/notification.js
resources/src/mediawiki.rcfilters/Controller.js
resources/src/mediawiki.rcfilters/dm/FilterGroup.js
resources/src/mediawiki.rcfilters/dm/FilterItem.js
resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js
resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js
resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/GroupWidget.js
resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js
resources/src/mediawiki.searchSuggest/searchSuggest.js
resources/src/mediawiki.special.apisandbox/apisandbox.js
resources/src/mediawiki.template.mustache.js
resources/src/mediawiki.toc/toc.js
resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js
resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js
resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
tests/qunit/.eslintrc.json
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/jquery/jquery.color.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js

index 0c0a7b5..85d91b6 100644 (file)
@@ -12,6 +12,6 @@
        "rules": {
                "quote-props": [ "error", "as-needed" ],
                "max-len": "off",
-               "jquery/no-global-selector": "off"
+               "no-jquery/no-global-selector": "off"
        }
 }
index b0c5c4c..521072e 100644 (file)
@@ -20,7 +20,7 @@
                        .show()
                        .on( 'click', function () {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $( this ).closest( '.config-help-field-container' ).find( '.config-help-field-data' )
                                        .slideToggle( 'fast' );
                        } );
@@ -36,9 +36,9 @@
                                $wrapper = $( document.getElementById( $checked.attr( 'rel' ) ) );
                        if ( $wrapper.is( ':hidden' ) ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $( '.dbWrapper' ).hide( 'slow' );
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.show( 'slow' );
                        }
                } );
                        var $wrapper = $( '#config-cc-wrapper' );
                        if ( $( '#config__LicenseCode_cc-choose' ).is( ':checked' ) ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.show( 'slow' );
                        } else {
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.hide( 'slow' );
                        }
                } );
                        var $wrapper = $( '#' + $( this ).attr( 'rel' ) );
                        if ( $( this ).is( ':checked' ) ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.show( 'slow' );
                        } else {
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.hide( 'slow' );
                        }
                } );
                        var $wrapper = $( '#' + $( this ).attr( 'rel' ) );
                        if ( $( this ).is( ':checked' ) ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.hide( 'slow' );
                        } else {
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $wrapper.show( 'slow' );
                        }
                } );
                        // FIXME: Ugh, this is ugly
                        if ( $( this ).val() === 'other' ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $textbox.prop( 'readonly', false ).closest( '.config-block' ).slideDown( 'fast' );
                        } else {
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' );
                        }
                } );
                        var $memc = $( '#config-memcachewrapper' );
                        if ( $( 'input[name$="config__MainCacheType"]:checked' ).val() === 'memcached' ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $memc.show( 'slow' );
                        } else {
-                               // eslint-disable-next-line jquery/no-animate-toggle
+                               // eslint-disable-next-line no-jquery/no-animate-toggle
                                $memc.hide( 'slow' );
                        }
                } );
index 387e74e..6bcc98a 100644 (file)
@@ -11,7 +11,7 @@
     "selenium-test": "wdio ./tests/selenium/wdio.conf.js"
   },
   "devDependencies": {
-    "eslint-config-wikimedia": "0.10.1",
+    "eslint-config-wikimedia": "0.11.0",
     "grunt": "1.0.3",
     "grunt-banana-checker": "0.6.0",
     "grunt-contrib-copy": "1.0.0",
index 57fd3ab..6107af1 100644 (file)
 
                        // Loop through all the dom cells of the thead
                        $tableRows.each( function ( rowIndex, row ) {
-                               // eslint-disable-next-line jquery/no-each-util
+                               // eslint-disable-next-line no-jquery/no-each-util
                                $.each( row.cells, function ( columnIndex, cell ) {
                                        var matrixRowIndex,
                                                matrixColumnIndex;
        function convertSortList( sortObjects ) {
                var sortList = [];
                sortObjects.forEach( function ( sortObject ) {
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( sortObject, function ( columnIndex, order ) {
                                var orderIndex = ( order === 'desc' ) ? 1 : 0;
                                sortList.push( [ parseInt( columnIndex, 10 ), orderIndex ] );
index 385604d..c7c061e 100644 (file)
                         */
                        getQueryString: function () {
                                var args = [];
-                               // eslint-disable-next-line jquery/no-each-util
+                               // eslint-disable-next-line no-jquery/no-each-util
                                $.each( this.query, function ( key, val ) {
                                        var k = Uri.encode( key ),
                                                vals = Array.isArray( val ) ? val : [ val ];
index e907a98..a370881 100644 (file)
@@ -74,7 +74,7 @@
                // Can't use fadeTo because it calls show(), and we might want to keep some elements hidden
                // (e.g. empty #catlinks)
                // FIXME: Use CSS transition
-               // eslint-disable-next-line jquery/no-animate
+               // eslint-disable-next-line no-jquery/no-animate
                $copyElements.animate( { opacity: 0.4 }, 'fast' );
 
                api = new mw.Api();
                                }
 
                                newList = [];
-                               // eslint-disable-next-line jquery/no-each-util
+                               // eslint-disable-next-line no-jquery/no-each-util
                                $.each( response.parse.indicators, function ( name, indicator ) {
                                        newList.push(
                                                $( '<div>' )
                } ).always( function () {
                        $spinner.hide();
                        // FIXME: Use CSS transition
-                       // eslint-disable-next-line jquery/no-animate
+                       // eslint-disable-next-line no-jquery/no-animate
                        $copyElements.animate( {
                                opacity: 1
                        }, 'fast' );
index 1e7a6e4..dbf029e 100644 (file)
@@ -12,7 +12,7 @@
                                $a = $( '#ca-edit a' );
                                // Not every page has an edit link (T59713)
                                if ( $a.length ) {
-                                       // eslint-disable-next-line jquery/no-event-shorthand
+                                       // eslint-disable-next-line no-jquery/no-event-shorthand
                                        $a.get( 0 ).click();
                                }
                        }
index e3f96b1..e485de1 100644 (file)
@@ -21,7 +21,7 @@
                if ( e.target.nodeName.toLowerCase() !== 'a' ) {
                        // Trigger native HTMLElement click instead of opening URL (T45052)
                        e.preventDefault();
-                       // eslint-disable-next-line jquery/no-event-shorthand
+                       // eslint-disable-next-line no-jquery/no-event-shorthand
                        $edit.get( 0 ).click();
                }
        } );
index f168515..0613023 100644 (file)
@@ -53,7 +53,7 @@
        // Pre-populate with fake ajax promises to save http requests for tokens
        // we already have on the page via the user.tokens module (T36733).
        promises[ defaultOptions.ajax.url ] = {};
-       // eslint-disable-next-line jquery/no-each-util
+       // eslint-disable-next-line no-jquery/no-each-util
        $.each( mw.user.tokens.get(), function ( key, value ) {
                // This requires #getToken to use the same key as user.tokens.
                // Format: token-type + "Token" (eg. csrfToken, patrolToken, watchToken).
index e5d0574..de0688a 100644 (file)
 
                        file.name = 'file';
 
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( data, function ( key, val ) {
                                $form.append( getHiddenInput( key, val ) );
                        } );
index 189363f..8da7a06 100644 (file)
@@ -91,7 +91,7 @@
                        // Hide the current pane
                        if ( requestedPaneId === currentPaneId ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $currentPane.slideUp( updateHov );
                                debug.$container.data( 'currentPane', null );
                                return;
 
                        if ( currentPaneId === undefined || currentPaneId === null ) {
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $requestedPane.slideDown( updateHov );
                        } else {
                                $currentPane.hide();
index 661a1c4..78e9f5f 100644 (file)
 
                if ( errors.length === 0 ) {
                        // FIXME: Use CSS transition
-                       // eslint-disable-next-line jquery/no-slide
+                       // eslint-disable-next-line no-jquery/no-slide
                        $errorBox.slideUp( function () {
                                $errorBox
                                        .removeAttr( 'class' )
                                                .detach();
                                }
                                // FIXME: Use CSS transition
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $errorBox
                                        .attr( 'class', 'error' )
                                        .empty()
                                        .slideDown();
                        };
                        if ( $oldErrorBox !== $errorBox && $oldErrorBox.hasClass( 'error' ) ) {
-                               // eslint-disable-next-line jquery/no-slide
+                               // eslint-disable-next-line no-jquery/no-slide
                                $oldErrorBox.slideUp( showFunc );
                        } else {
                                showFunc();
index 849ccbc..a500226 100644 (file)
 
                style.textContent = css;
                document.body.appendChild( style );
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( style.sheet.cssRules, function ( index, rule ) {
                        selectors.total++;
                        // document.querySelector() on prefixed pseudo-elements can throw exceptions
index 846deb9..3b89a74 100644 (file)
        mw.jqueryMsg.HtmlEmitter = function ( language, magic ) {
                var jmsg = this;
                this.language = language;
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( magic, function ( key, val ) {
                        jmsg[ key.toLowerCase() ] = function () {
                                return val;
                                // typeof returns object for arrays
                                case 'object':
                                        // node is an array of nodes
-                                       // eslint-disable-next-line jquery/no-map-util
+                                       // eslint-disable-next-line no-jquery/no-map-util
                                        subnodes = $.map( node.slice( 1 ), function ( n ) {
                                                return jmsg.emit( n, replacements );
                                        } );
                 */
                concat: function ( nodes ) {
                        var $span = $( '<span>' ).addClass( 'mediaWiki_htmlEmitter' );
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( nodes, function ( i, node ) {
                                // Let jQuery append nodes, arrays of nodes and jQuery objects
                                // other things (strings, numbers, ..) are appended as text nodes (not as HTML strings)
                        }
 
                        // Remove explicit plural forms from the forms. They were set undefined in the above loop.
-                       // eslint-disable-next-line jquery/no-map-util
+                       // eslint-disable-next-line no-jquery/no-map-util
                        forms = $.map( forms, function ( form ) {
                                return form;
                        } );
index b3707a5..1d0e335 100644 (file)
                 * @return {boolean}
                 */
                matchAttribute: function ( objects, attrName ) {
-                       // eslint-disable-next-line jquery/no-map-util
+                       // eslint-disable-next-line no-jquery/no-map-util
                        return $.map( objects, function ( object ) {
                                return object[ attrName ];
                        } ).filter( function ( item, index, a ) {
index e8450df..cd19cb1 100644 (file)
                                        notif.$notification.remove();
                                } else {
                                        // FIXME: Use CSS transition
-                                       // eslint-disable-next-line jquery/no-slide
+                                       // eslint-disable-next-line no-jquery/no-slide
                                        notif.$notification.slideUp( 'fast', function () {
                                                $( this ).remove();
                                        } );
index 30d4a90..cd22da7 100644 (file)
@@ -69,7 +69,7 @@
                // Prepare views
                if ( namespaceStructure ) {
                        items = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( namespaceStructure, function ( namespaceID, label ) {
                                // Build and clean up the individual namespace items definition
                                items.push( {
                // Before we do anything, we need to see if we require additional items in the
                // groups that have 'AllowArbitrary'. For the moment, those are only single_option
                // groups; if we ever expand it, this might need further generalization:
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( views, function ( viewName, viewData ) {
                        viewData.groups.forEach( function ( groupData ) {
                                var extraValues = [];
         */
        Controller.prototype.updateNumericPreference = function ( prefName, newValue ) {
                // FIXME: $.isNumeric is deprecated
-               // eslint-disable-next-line jquery/no-is-numeric
+               // eslint-disable-next-line no-jquery/no-is-numeric
                if ( !$.isNumeric( newValue ) ) {
                        return;
                }
index 831e6eb..db504b5 100644 (file)
 
                // Check for filters that should be initially selected by their default value
                if ( this.isSticky() ) {
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.defaultFilters, function ( filterName, filterValue ) {
                                model.getItemByName( filterName ).toggleSelected( filterValue );
                        } );
                                        selected = [];
 
                                // Find if any are selected
-                               // eslint-disable-next-line jquery/no-each-util
+                               // eslint-disable-next-line no-jquery/no-each-util
                                $.each( filters, function ( name, value ) {
                                        if ( value ) {
                                                selected.push( name );
                        // all false
 
                        // Go over the items and define the correct values
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( filterRepresentation, function ( name, value ) {
                                // We must store all parameter values as strings '0' or '1'
                                if ( model.getType() === 'send_unselected_if_any' ) {
                } else if ( this.getType() === 'string_options' ) {
                        values = [];
 
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( filterRepresentation, function ( name, value ) {
                                // Collect values
                                if ( value ) {
                                }
                        } );
 
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( expandedParams, function ( paramName, paramValue ) {
                                var filterItem = paramToFilterMap[ paramName ];
 
index 3e11d1e..1138c4e 100644 (file)
@@ -98,7 +98,7 @@
 
                key = key || 'contextDescription';
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( conflicts, function ( filterName, conflict ) {
                        if ( !conflict.item.isSelected() ) {
                                return;
index 2e6abab..d1b9f7a 100644 (file)
                                filterItemGroup = filterItem.getGroupModel();
 
                        // For each item, see if that item is still conflicting
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( model.groups, function ( groupName, groupModel ) {
                                if ( filterItem.getGroupName() === groupName ) {
                                        // Check inside the group
                        expandConflictDefinitions = function ( obj ) {
                                var result = {};
 
-                               // eslint-disable-next-line jquery/no-each-util
+                               // eslint-disable-next-line no-jquery/no-each-util
                                $.each( obj, function ( key, conflicts ) {
                                        var filterName,
                                                adjustedConflicts = {};
                }, views );
 
                // Go over all views
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( allViews, function ( viewName, viewData ) {
                        // Define the view
                        model.views[ viewName ] = {
                filterConflictResult = expandConflictDefinitions( filterConflictMap );
 
                // Set conflicts for groups
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( groupConflictResult, function ( group, conflicts ) {
                        model.groups[ group ].setConflicts( conflicts );
                } );
 
                // Set conflicts for items
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( filterConflictResult, function ( filterName, conflicts ) {
                        var filterItem = model.getItemByName( filterName );
                        // set conflicts for items in the group
                } );
 
                // Create a map between known parameters and their models
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( group, groupModel ) {
                        if (
                                groupModel.getType() === 'send_unselected_if_any' ||
                var filtersValue;
                // For arbitrary numeric single_option values make sure the values
                // are normalized to fit within the limits
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.getFilterGroups(), function ( groupName, groupModel ) {
                        params[ groupName ] = groupModel.normalizeArbitraryValue( params[ groupName ] );
                } );
                parameters = parameters ? $.extend( true, {}, parameters ) : this.getCurrentParameterState();
 
                // Params
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.getEmptyParameterState(), function ( param, value ) {
                        if ( parameters[ param ] !== undefined && parameters[ param ] !== value ) {
                                result[ param ] = parameters[ param ];
 
                view = view || this.getCurrentView();
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( groupName, groupModel ) {
                        if ( groupModel.getView() === view ) {
                                result[ groupName ] = groupModel;
 
                groups = this.getFilterGroupsByView( view );
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( groups, function ( groupName, groupModel ) {
                        result = result.concat( groupModel.getItems() );
                } );
                var result = {};
 
                // Get default filter state
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( name, model ) {
                        if ( !model.isSticky() ) {
                                $.extend( true, result, model.getDefaultParams() );
        FiltersViewModel.prototype.getStickyParams = function () {
                var result = [];
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( name, model ) {
                        if ( model.isSticky() ) {
                                if ( model.isPerGroupRequestParameter() ) {
        FiltersViewModel.prototype.getStickyParamsValues = function () {
                var result = {};
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( name, model ) {
                        if ( model.isSticky() ) {
                                $.extend( true, result, model.getParamRepresentation() );
                        } );
                }
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( groupItems, function ( group, model ) {
                        $.extend(
                                result,
                //    },
                //    group2: "param4|param5"
                // }
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( params, function ( paramName, paramValue ) {
                        var groupName,
                                itemOrGroup = model.parameterMap[ paramName ];
 
                // Go over all groups, so we make sure we get the complete output
                // even if the parameters don't include a certain group
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.groups, function ( groupName, groupModel ) {
                        result = $.extend( true, {}, result, groupModel.getFilterRepresentation( groupMap[ groupName ] ) );
                } );
        FiltersViewModel.prototype.findSelectedItems = function () {
                var allSelected = [];
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.getFilterGroups(), function ( groupName, groupModel ) {
                        allSelected = allSelected.concat( groupModel.findSelectedItems() );
                } );
        FiltersViewModel.prototype.getViewByTrigger = function ( trigger ) {
                var result = 'default';
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.views, function ( name, data ) {
                        if ( data.trigger === trigger ) {
                                result = name;
                        visibleGroupNames = Object.keys( visibleGroups );
 
                        // Update visibility of items and groups
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.getFilterGroups(), function ( groupName, groupModel ) {
                                // Check if the group is visible at all
                                groupModel.toggleVisible( visibleGroupNames.indexOf( groupName ) !== -1 );
index 34c57dd..aa407b9 100644 (file)
                        //     }
                        //   }
                        // }
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( savedQueries.queries || {}, function ( id, obj ) {
                                if ( obj.data && obj.data.filters ) {
                                        obj.data = model.convertToParameters( obj.data );
                }
 
                // Initialize the query items
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( savedQueries.queries || {}, function ( id, obj ) {
                        var normalizedData = obj.data,
                                isDefault = String( savedQueries.default ) === String( id );
 
                // Highlights: appending _color to keys
                newData.highlights = {};
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( data.highlights, function ( highlightedFilterName, value ) {
                        if ( value ) {
                                newData.highlights[ highlightedFilterName + '_color' ] = data.highlights[ highlightedFilterName ];
                        data = this.filtersModel.getMinimizedParamRepresentation( fulldata );
 
                // Split highlight/params
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( data, function ( param, value ) {
                        if ( param !== 'highlight' && highlightParamNames.indexOf( param ) > -1 ) {
                                normalizedData.highlights[ param ] = value;
index 361fe31..ba7f4d1 100644 (file)
                }
 
                // FIXME: Use CSS transition
-               // eslint-disable-next-line jquery/no-fade
+               // eslint-disable-next-line no-jquery/no-fade
                $newChanges
                        .hide()
                        .fadeIn( 1000 );
index 4881542..dc6fc12 100644 (file)
                                )
                        )
                ) {
-                       // eslint-disable-next-line jquery/no-animate
                        $( container ).animate( {
                                scrollTop: newScrollTop
                        } );
index 17c038e..73b874c 100644 (file)
@@ -23,7 +23,7 @@
 
                if ( config.events ) {
                        // Aggregate events
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( config.events, function ( eventName, eventEmit ) {
                                aggregate[ eventName ] = eventEmit;
                        } );
index c352f5a..864d0cf 100644 (file)
                this.$overlay.append( this.highlightPopup.$element );
 
                // Count groups per view
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( groups, function ( groupName, groupModel ) {
                        if ( !groupModel.isHidden() ) {
                                viewGroupCount[ groupModel.getView() ] = viewGroupCount[ groupModel.getView() ] || 0;
                        }
                } );
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( groups, function ( groupName, groupModel ) {
                        var currentItems = [],
                                view = groupModel.getView();
index 0069cf9..df12b2e 100644 (file)
@@ -2,7 +2,7 @@
  * Add search suggestions to the search form.
  */
 ( function () {
-       // eslint-disable-next-line jquery/no-map-util
+       // eslint-disable-next-line no-jquery/no-map-util
        var searchNS = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( nsName, nsID ) {
                if ( nsID >= 0 && mw.user.options.get( 'searchNs' + nsID ) ) {
                        // Cast string key to number
index 68c7ddc..e063a39 100644 (file)
                                        break;
 
                                case 'namespace':
-                                       // eslint-disable-next-line jquery/no-map-util
+                                       // eslint-disable-next-line no-jquery/no-map-util
                                        items = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( name, ns ) {
                                                if ( ns === '0' ) {
                                                        name = mw.message( 'blanknamespace' ).text();
                }
 
                toRemove = {};
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.templatedItemsCache, function ( k, el ) {
                        if ( el.widget.isElementAttached() ) {
                                toRemove[ k ] = el;
                                        }
                                } else {
                                        newVars = {};
-                                       // eslint-disable-next-line jquery/no-each-util
+                                       // eslint-disable-next-line no-jquery/no-each-util
                                        $.each( p.vars, function ( k, v ) {
                                                newVars[ k ] = v.replace( placeholder, value );
                                        } );
                };
                while ( toProcess.length ) {
                        p = toProcess.shift();
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( p.vars, doProcess );
                }
 
-               // eslint-disable-next-line jquery/no-map-util
+               // eslint-disable-next-line no-jquery/no-map-util
                toRemove = $.map( toRemove, function ( el, name ) {
                        delete that.widgets[ name ];
                        return [ el.widgetField, el.helpField ];
                if ( this.paramInfo === null ) {
                        return [];
                } else {
-                       // eslint-disable-next-line jquery/no-map-util
+                       // eslint-disable-next-line no-jquery/no-map-util
                        promises = $.map( this.widgets, function ( widget ) {
                                return widget.apiCheckValid();
                        } );
                if ( this.paramInfo === null ) {
                        this.loadFromQueryParams = params;
                } else {
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.widgets, function ( name, widget ) {
                                var v = Object.prototype.hasOwnProperty.call( params, name ) ? params[ name ] : undefined;
                                widget.setApiValue( v );
         * @param {Object} displayParams Write query parameters for display into this object
         */
        ApiSandbox.PageLayout.prototype.getQueryParams = function ( params, displayParams ) {
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.widgets, function ( name, widget ) {
                        var value = widget.getApiValue();
                        if ( value !== undefined ) {
         */
        ApiSandbox.PageLayout.prototype.getSubpages = function () {
                var ret = [];
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.widgets, function ( name, widget ) {
                        var submodules, i;
                        if ( typeof widget.getSubmodules === 'function' ) {
index de519cb..28cd76c 100644 (file)
@@ -21,7 +21,7 @@
                                render: function ( data, partialTemplates ) {
                                        var partials = {};
                                        if ( partialTemplates ) {
-                                               // eslint-disable-next-line jquery/no-each-util
+                                               // eslint-disable-next-line no-jquery/no-each-util
                                                $.each( partialTemplates, function ( name, template ) {
                                                        partials[ name ] = template.getSource();
                                                } );
index 85dbf97..e574568 100644 (file)
                        function toggleToc() {
                                if ( $tocList.is( ':hidden' ) ) {
                                        // FIXME: Use CSS transitions
-                                       // eslint-disable-next-line jquery/no-slide
+                                       // eslint-disable-next-line no-jquery/no-slide
                                        $tocList.slideDown( 'fast' );
                                        $tocToggleLink.text( mw.msg( 'hidetoc' ) );
                                        $this.removeClass( 'tochidden' );
                                        mw.cookie.set( 'hidetoc', null );
                                } else {
-                                       // eslint-disable-next-line jquery/no-slide
+                                       // eslint-disable-next-line no-jquery/no-slide
                                        $tocList.slideUp( 'fast' );
                                        $tocToggleLink.text( mw.msg( 'showtoc' ) );
                                        $this.addClass( 'tochidden' );
index e8c1b9b..3bfeb8d 100644 (file)
                                                        parseValue: this.parseSpecValue
                                                };
                                                spec.size = Math.max.apply(
-                                                       // eslint-disable-next-line jquery/no-map-util
+                                                       // eslint-disable-next-line no-jquery/no-map-util
                                                        null, $.map( spec.values, function ( v ) { return v.length; } )
                                                );
                                                return spec;
index fee27c5..ffc1818 100644 (file)
                                } else {
                                        maxlength = spec.size;
                                        if ( spec.intercalarySize ) {
-                                               // eslint-disable-next-line jquery/no-each-util
+                                               // eslint-disable-next-line no-jquery/no-each-util
                                                $.each( spec.intercalarySize, reduceFunc );
                                        }
                                        $field = $( '<input>' ).attr( 'type', 'text' )
index c64a550..f66b0d2 100644 (file)
                        }
                        if ( spec.values ) {
                                spec.size = Math.max.apply(
-                                       // eslint-disable-next-line jquery/no-map-util
+                                       // eslint-disable-next-line no-jquery/no-map-util
                                        null, $.map( spec.values, function ( v ) { return v.length; } )
                                );
                        }
index 06dd2d5..dd17b0b 100644 (file)
 
                if ( config.fullMonthNames && !config.shortMonthNames ) {
                        config.shortMonthNames = {};
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( config.fullMonthNames, function ( k, v ) {
                                config.shortMonthNames[ k ] = v.substr( 0, 3 );
                        } );
                }
                if ( config.shortDayNames && !config.dayLetters ) {
                        config.dayLetters = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( config.shortDayNames, function ( k, v ) {
                                config.dayLetters[ k ] = v.substr( 0, 1 );
                        } );
                }
                if ( config.fullDayNames && !config.dayLetters ) {
                        config.dayLetters = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( config.fullDayNames, function ( k, v ) {
                                config.dayLetters[ k ] = v.substr( 0, 1 );
                        } );
                }
                if ( config.fullDayNames && !config.shortDayNames ) {
                        config.shortDayNames = {};
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( config.fullDayNames, function ( k, v ) {
                                config.shortDayNames[ k ] = v.substr( 0, 3 );
                        } );
 
                if ( this.fullMonthNames && !this.shortMonthNames ) {
                        this.shortMonthNames = {};
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.fullMonthNames, function ( k, v ) {
                                this.shortMonthNames[ k ] = v.substr( 0, 3 );
                        }.bind( this ) );
                }
                if ( this.shortDayNames && !this.dayLetters ) {
                        this.dayLetters = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.shortDayNames, function ( k, v ) {
                                this.dayLetters[ k ] = v.substr( 0, 1 );
                        }.bind( this ) );
                }
                if ( this.fullDayNames && !this.dayLetters ) {
                        this.dayLetters = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.fullDayNames, function ( k, v ) {
                                this.dayLetters[ k ] = v.substr( 0, 1 );
                        }.bind( this ) );
                }
                if ( this.fullDayNames && !this.shortDayNames ) {
                        this.shortDayNames = {};
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.fullDayNames, function ( k, v ) {
                                this.shortDayNames[ k ] = v.substr( 0, 3 );
                        }.bind( this ) );
                }
                if ( !this.dayLetters ) {
                        this.dayLetters = [];
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.shortDayNames, function ( k, v ) {
                                this.dayLetters[ k ] = v.substr( 0, 1 );
                        }.bind( this ) );
                        spec.parseValue = this.parseSpecValue;
                        if ( spec.values ) {
                                spec.size = Math.max.apply(
-                                       // eslint-disable-next-line jquery/no-map-util
+                                       // eslint-disable-next-line no-jquery/no-map-util
                                        null, $.map( spec.values, function ( v ) { return v.length; } )
                                );
                        }
index 3c939ab..b1ab0d2 100644 (file)
                $headRow.append( $( '<td>' ).text( '\u00A0' ) );
 
                // Iterate over the columns object (ignore the value)
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.columns, function ( columnLabel ) {
                        $headRow.append( $( '<th>' ).html( columnLabel ) );
                } );
                $thead.append( $headRow );
 
                // Build table
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( this.rows, function ( rowLabel, rowTag ) {
                        var $row = $( '<tr>' ),
                                labelField = new OO.ui.FieldLayout(
@@ -65,7 +65,7 @@
                        $row.append( $( '<td>' ).append( labelField.$element ) );
 
                        // Columns
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( widget.columns, function ( columnLabel, columnTag ) {
                                var thisTag = columnTag + '-' + rowTag,
                                        checkbox = new OO.ui.CheckboxInputWidget( {
                // setDisabled sometimes gets called before the widget is ready
                if ( this.checkboxes && Object.keys( this.checkboxes ).length > 0 ) {
                        // Propagate to all checkboxes and update their disabled state
-                       // eslint-disable-next-line jquery/no-each-util
+                       // eslint-disable-next-line no-jquery/no-each-util
                        $.each( this.checkboxes, function ( name, checkbox ) {
                                checkbox.setDisabled( widget.isTagDisabled( name ) );
                        } );
index 7b9f71b..15f0d66 100644 (file)
@@ -45,7 +45,7 @@
                        exclude = config.exclude || [],
                        mainNamespace = mw.config.get( 'wgNamespaceIds' )[ '' ];
 
-               // eslint-disable-next-line jquery/no-map-util
+               // eslint-disable-next-line no-jquery/no-map-util
                options = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( name, ns ) {
                        if ( ns < mainNamespace || exclude.indexOf( Number( ns ) ) !== -1 ) {
                                return null; // skip
index 55d8cf5..818ad89 100644 (file)
                        urls = data.data[ 3 ],
                        self = this;
 
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( titles, function ( i, result ) {
                        items.push( new mw.widgets.TitleOptionWidget(
                                self.getOptionWidgetData(
index 03b02ba..bce5b16 100644 (file)
@@ -12,6 +12,6 @@
                "valid-jsdoc": "off",
                "qunit/require-expect": "off",
                "qunit/resolve-async": "off",
-               "jquery/no-parse-html-literal": "off"
+               "no-jquery/no-parse-html-literal": "off"
        }
 }
index df3d61b..3e52d8b 100644 (file)
                                // Check for incomplete animations/requests/etc and throw if there are any.
                                if ( $.timers && $.timers.length !== 0 ) {
                                        timers = $.timers.length;
-                                       // eslint-disable-next-line jquery/no-each-util
+                                       // eslint-disable-next-line no-jquery/no-each-util
                                        $.each( $.timers, function ( i, timer ) {
                                                var node = timer.elem;
                                                mw.log.warn( 'Unfinished animation #' + i + ' in ' + timer.queue + ' queue on ' +
                var altPromises = [];
 
                // When we have ES6 support we'll be able to use Array.from here
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( arguments, function ( i, arg ) {
                        var alt = $.Deferred();
                        altPromises.push( alt );
index 2e35420..fdde3ba 100644 (file)
@@ -5,7 +5,7 @@
                var done = assert.async(),
                        $canvas = $( '<div>' ).css( 'background-color', '#fff' ).appendTo( '#qunit-fixture' );
 
-               // eslint-disable-next-line jquery/no-animate
+               // eslint-disable-next-line no-jquery/no-animate
                $canvas.animate( { 'background-color': '#000' }, 3 ).promise()
                        .done( function () {
                                var endColors = $.colorUtil.getRGB( $canvas.css( 'background-color' ) );
index 56801de..a237c7e 100644 (file)
@@ -74,7 +74,7 @@
                } );
        }
 
-       // eslint-disable-next-line jquery/no-each-util
+       // eslint-disable-next-line no-jquery/no-each-util
        $.each( pluralTestcases, function ( langCode, tests ) {
                if ( langCode === mw.config.get( 'wgUserLanguage' ) ) {
                        pluralTest( langCode, tests );
index 5a4d614..3d008f6 100644 (file)
                ]
        };
 
-       // eslint-disable-next-line jquery/no-each-util
+       // eslint-disable-next-line no-jquery/no-each-util
        $.each( grammarTests, function ( langCode, test ) {
                if ( langCode === mw.config.get( 'wgUserLanguage' ) ) {
                        grammarTest( langCode, test );
index d22c8d0..6b316e5 100644 (file)
        QUnit.test( 'wikiUrlencode', function ( assert ) {
                assert.strictEqual( util.wikiUrlencode( 'Test:A & B/Here' ), 'Test:A_%26_B/Here' );
                // See also wfUrlencodeTest.php#provideURLS
-               // eslint-disable-next-line jquery/no-each-util
+               // eslint-disable-next-line no-jquery/no-each-util
                $.each( {
                        '+': '%2B',
                        '&': '%26',