aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorEd Sanders <esanders@wikimedia.org>2019-02-20 22:53:09 +0000
committerBartosz DziewoƄski <matma.rex@gmail.com>2019-02-20 23:36:03 +0000
commit9097f95ecc3c45f9265779e0051658ed9e2d2c91 (patch)
treeaeac43555810441f058ee5eac4db9039d107c698 /resources
parent26bbbc3afb076063634ebcb5bbac951d2132fff9 (diff)
downloadmediawikicore-9097f95ecc3c45f9265779e0051658ed9e2d2c91.tar.gz
mediawikicore-9097f95ecc3c45f9265779e0051658ed9e2d2c91.zip
build: Update eslint-config-wikimedia to 0.11.0
Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
Diffstat (limited to 'resources')
-rw-r--r--resources/src/jquery.tablesorter/jquery.tablesorter.js4
-rw-r--r--resources/src/mediawiki.Uri/Uri.js2
-rw-r--r--resources/src/mediawiki.action/mediawiki.action.edit.preview.js6
-rw-r--r--resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js2
-rw-r--r--resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js2
-rw-r--r--resources/src/mediawiki.api/index.js2
-rw-r--r--resources/src/mediawiki.api/upload.js2
-rw-r--r--resources/src/mediawiki.debug/debug.js4
-rw-r--r--resources/src/mediawiki.htmlform.checker.js6
-rw-r--r--resources/src/mediawiki.inspect.js2
-rw-r--r--resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js8
-rw-r--r--resources/src/mediawiki.legacy/protect.js2
-rw-r--r--resources/src/mediawiki.notification/notification.js2
-rw-r--r--resources/src/mediawiki.rcfilters/Controller.js6
-rw-r--r--resources/src/mediawiki.rcfilters/dm/FilterGroup.js10
-rw-r--r--resources/src/mediawiki.rcfilters/dm/FilterItem.js2
-rw-r--r--resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js38
-rw-r--r--resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js8
-rw-r--r--resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js2
-rw-r--r--resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js1
-rw-r--r--resources/src/mediawiki.rcfilters/ui/GroupWidget.js2
-rw-r--r--resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js4
-rw-r--r--resources/src/mediawiki.searchSuggest/searchSuggest.js2
-rw-r--r--resources/src/mediawiki.special.apisandbox/apisandbox.js18
-rw-r--r--resources/src/mediawiki.template.mustache.js2
-rw-r--r--resources/src/mediawiki.toc/toc.js4
-rw-r--r--resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js2
-rw-r--r--resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js2
-rw-r--r--resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js2
-rw-r--r--resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js20
-rw-r--r--resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js8
-rw-r--r--resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js2
-rw-r--r--resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js2
33 files changed, 90 insertions, 91 deletions
diff --git a/resources/src/jquery.tablesorter/jquery.tablesorter.js b/resources/src/jquery.tablesorter/jquery.tablesorter.js
index 57fd3ab536ff..6107af18838b 100644
--- a/resources/src/jquery.tablesorter/jquery.tablesorter.js
+++ b/resources/src/jquery.tablesorter/jquery.tablesorter.js
@@ -324,7 +324,7 @@
// 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;
@@ -773,7 +773,7 @@
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 ] );
diff --git a/resources/src/mediawiki.Uri/Uri.js b/resources/src/mediawiki.Uri/Uri.js
index 385604df74e3..c7c061e864db 100644
--- a/resources/src/mediawiki.Uri/Uri.js
+++ b/resources/src/mediawiki.Uri/Uri.js
@@ -371,7 +371,7 @@
*/
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 ];
diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
index e907a985b117..a3708817ba7f 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
@@ -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();
@@ -151,7 +151,7 @@
}
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>' )
@@ -261,7 +261,7 @@
} ).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' );
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js b/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
index 1e7a6e48c354..dbf029e3c2d8 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
@@ -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();
}
}
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js b/resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js
index e3f96b12e72c..e485de14352c 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js
@@ -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();
}
} );
diff --git a/resources/src/mediawiki.api/index.js b/resources/src/mediawiki.api/index.js
index f1685159e1df..06130232e296 100644
--- a/resources/src/mediawiki.api/index.js
+++ b/resources/src/mediawiki.api/index.js
@@ -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).
diff --git a/resources/src/mediawiki.api/upload.js b/resources/src/mediawiki.api/upload.js
index e5d057456ac4..de0688af6844 100644
--- a/resources/src/mediawiki.api/upload.js
+++ b/resources/src/mediawiki.api/upload.js
@@ -233,7 +233,7 @@
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 ) );
} );
diff --git a/resources/src/mediawiki.debug/debug.js b/resources/src/mediawiki.debug/debug.js
index 189363f2361e..8da7a0699aeb 100644
--- a/resources/src/mediawiki.debug/debug.js
+++ b/resources/src/mediawiki.debug/debug.js
@@ -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;
@@ -101,7 +101,7 @@
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();
diff --git a/resources/src/mediawiki.htmlform.checker.js b/resources/src/mediawiki.htmlform.checker.js
index 661a1c4b4786..78e9f5f6acaf 100644
--- a/resources/src/mediawiki.htmlform.checker.js
+++ b/resources/src/mediawiki.htmlform.checker.js
@@ -119,7 +119,7 @@
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' )
@@ -163,7 +163,7 @@
.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()
@@ -173,7 +173,7 @@
.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();
diff --git a/resources/src/mediawiki.inspect.js b/resources/src/mediawiki.inspect.js
index 849ccbcb68e4..a500226e2bdf 100644
--- a/resources/src/mediawiki.inspect.js
+++ b/resources/src/mediawiki.inspect.js
@@ -158,7 +158,7 @@
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
diff --git a/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js b/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
index 846deb95e1d2..3b89a744fed1 100644
--- a/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
+++ b/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
@@ -966,7 +966,7 @@
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;
@@ -992,7 +992,7 @@
// 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 );
} );
@@ -1033,7 +1033,7 @@
*/
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)
@@ -1217,7 +1217,7 @@
}
// 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;
} );
diff --git a/resources/src/mediawiki.legacy/protect.js b/resources/src/mediawiki.legacy/protect.js
index b3707a52670b..1d0e33507c1c 100644
--- a/resources/src/mediawiki.legacy/protect.js
+++ b/resources/src/mediawiki.legacy/protect.js
@@ -155,7 +155,7 @@
* @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 ) {
diff --git a/resources/src/mediawiki.notification/notification.js b/resources/src/mediawiki.notification/notification.js
index e8450df396f0..cd19cb1d1d83 100644
--- a/resources/src/mediawiki.notification/notification.js
+++ b/resources/src/mediawiki.notification/notification.js
@@ -248,7 +248,7 @@
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();
} );
diff --git a/resources/src/mediawiki.rcfilters/Controller.js b/resources/src/mediawiki.rcfilters/Controller.js
index 30d4a900d879..cd22da79ee6d 100644
--- a/resources/src/mediawiki.rcfilters/Controller.js
+++ b/resources/src/mediawiki.rcfilters/Controller.js
@@ -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( {
@@ -207,7 +207,7 @@
// 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 = [];
@@ -898,7 +898,7 @@
*/
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;
}
diff --git a/resources/src/mediawiki.rcfilters/dm/FilterGroup.js b/resources/src/mediawiki.rcfilters/dm/FilterGroup.js
index 831e6eb23266..db504b5937c3 100644
--- a/resources/src/mediawiki.rcfilters/dm/FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/FilterGroup.js
@@ -206,7 +206,7 @@
// 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 );
} );
@@ -567,7 +567,7 @@
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 );
@@ -616,7 +616,7 @@
// 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' ) {
@@ -634,7 +634,7 @@
} 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 ) {
@@ -695,7 +695,7 @@
}
} );
- // 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 ];
diff --git a/resources/src/mediawiki.rcfilters/dm/FilterItem.js b/resources/src/mediawiki.rcfilters/dm/FilterItem.js
index 3e11d1eceac2..1138c4e6f8cc 100644
--- a/resources/src/mediawiki.rcfilters/dm/FilterItem.js
+++ b/resources/src/mediawiki.rcfilters/dm/FilterItem.js
@@ -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;
diff --git a/resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js b/resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js
index 2e6ababf6845..d1b9f7a97360 100644
--- a/resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js
@@ -114,7 +114,7 @@
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
@@ -244,7 +244,7 @@
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 = {};
@@ -329,7 +329,7 @@
}, 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 ] = {
@@ -376,13 +376,13 @@
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
@@ -390,7 +390,7 @@
} );
// 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' ||
@@ -427,7 +427,7 @@
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 ] );
} );
@@ -483,7 +483,7 @@
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 ];
@@ -578,7 +578,7 @@
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;
@@ -602,7 +602,7 @@
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() );
} );
@@ -680,7 +680,7 @@
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() );
@@ -698,7 +698,7 @@
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() ) {
@@ -723,7 +723,7 @@
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() );
@@ -760,7 +760,7 @@
} );
}
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( groupItems, function ( group, model ) {
$.extend(
result,
@@ -797,7 +797,7 @@
// },
// 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 ];
@@ -813,7 +813,7 @@
// 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 ] ) );
} );
@@ -1107,7 +1107,7 @@
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() );
} );
@@ -1145,7 +1145,7 @@
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;
@@ -1199,7 +1199,7 @@
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 );
diff --git a/resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js b/resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js
index 34c57dd16806..aa407b91ee89 100644
--- a/resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/SavedQueriesModel.js
@@ -106,7 +106,7 @@
// }
// }
// }
- // 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 );
@@ -118,7 +118,7 @@
}
// 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 );
@@ -199,7 +199,7 @@
// 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 ];
@@ -229,7 +229,7 @@
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;
diff --git a/resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js
index 361fe31453c1..ba7f4d11a610 100644
--- a/resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/ChangesListWrapperWidget.js
@@ -249,7 +249,7 @@
}
// FIXME: Use CSS transition
- // eslint-disable-next-line jquery/no-fade
+ // eslint-disable-next-line no-jquery/no-fade
$newChanges
.hide()
.fadeIn( 1000 );
diff --git a/resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js
index 4881542dc2f5..dc6fc12e1d6c 100644
--- a/resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js
@@ -767,7 +767,6 @@
)
)
) {
- // eslint-disable-next-line jquery/no-animate
$( container ).animate( {
scrollTop: newScrollTop
} );
diff --git a/resources/src/mediawiki.rcfilters/ui/GroupWidget.js b/resources/src/mediawiki.rcfilters/ui/GroupWidget.js
index 17c038efe57c..73b874cbe43d 100644
--- a/resources/src/mediawiki.rcfilters/ui/GroupWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/GroupWidget.js
@@ -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;
} );
diff --git a/resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js b/resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js
index c352f5afae4d..864d0cf80f6b 100644
--- a/resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/MenuSelectWidget.js
@@ -156,7 +156,7 @@
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;
@@ -164,7 +164,7 @@
}
} );
- // 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();
diff --git a/resources/src/mediawiki.searchSuggest/searchSuggest.js b/resources/src/mediawiki.searchSuggest/searchSuggest.js
index 0069cf9cbc6a..df12b2e04605 100644
--- a/resources/src/mediawiki.searchSuggest/searchSuggest.js
+++ b/resources/src/mediawiki.searchSuggest/searchSuggest.js
@@ -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
diff --git a/resources/src/mediawiki.special.apisandbox/apisandbox.js b/resources/src/mediawiki.special.apisandbox/apisandbox.js
index 68c7ddc00f88..e063a394c019 100644
--- a/resources/src/mediawiki.special.apisandbox/apisandbox.js
+++ b/resources/src/mediawiki.special.apisandbox/apisandbox.js
@@ -524,7 +524,7 @@
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();
@@ -1599,7 +1599,7 @@
}
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;
@@ -1688,7 +1688,7 @@
}
} 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 );
} );
@@ -1704,11 +1704,11 @@
};
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 ];
@@ -2000,7 +2000,7 @@
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();
} );
@@ -2026,7 +2026,7 @@
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 );
@@ -2042,7 +2042,7 @@
* @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 ) {
@@ -2062,7 +2062,7 @@
*/
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' ) {
diff --git a/resources/src/mediawiki.template.mustache.js b/resources/src/mediawiki.template.mustache.js
index de519cbdd7ad..28cd76ce555a 100644
--- a/resources/src/mediawiki.template.mustache.js
+++ b/resources/src/mediawiki.template.mustache.js
@@ -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();
} );
diff --git a/resources/src/mediawiki.toc/toc.js b/resources/src/mediawiki.toc/toc.js
index 85dbf97a0eeb..e5745689ff11 100644
--- a/resources/src/mediawiki.toc/toc.js
+++ b/resources/src/mediawiki.toc/toc.js
@@ -15,13 +15,13 @@
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' );
diff --git a/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js b/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
index e8c1b9bdc34d..3bfeb8dc6b3a 100644
--- a/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
+++ b/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
@@ -333,7 +333,7 @@
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;
diff --git a/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js b/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
index fee27c56cbcf..ffc18187ec6f 100644
--- a/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
+++ b/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
@@ -373,7 +373,7 @@
} 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' )
diff --git a/resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js b/resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js
index c64a55025bc3..f66b0d2b82be 100644
--- a/resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js
+++ b/resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js
@@ -183,7 +183,7 @@
}
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; } )
);
}
diff --git a/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js b/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
index 06dd2d5025f3..dd17b0bef035 100644
--- a/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
+++ b/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
@@ -35,28 +35,28 @@
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 );
} );
@@ -157,28 +157,28 @@
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 ) );
@@ -241,7 +241,7 @@
}
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 ) );
@@ -390,7 +390,7 @@
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; } )
);
}
diff --git a/resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js
index 3c939abea40d..b1ab0d2f1690 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js
@@ -42,14 +42,14 @@
$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( {
@@ -143,7 +143,7 @@
// 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 ) );
} );
diff --git a/resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js
index 7b9f71b6aaf4..15f0d66750bb 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js
@@ -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
diff --git a/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
index 55d8cf5a86df..818ad89b21ec 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
@@ -194,7 +194,7 @@
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(