Esanders has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/365960 )
Change subject: build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
......................................................................
build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
Most indent and escaping fixes.
Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
---
M mw-config/config.js
M package.json
M resources/src/jquery/jquery.badge.js
M resources/src/jquery/jquery.colorUtil.js
M resources/src/jquery/jquery.makeCollapsible.js
M resources/src/jquery/jquery.mwExtension.js
M resources/src/jquery/jquery.suggestions.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.action/mediawiki.action.edit.preview.js
M resources/src/mediawiki.action/mediawiki.action.history.js
M resources/src/mediawiki.action/mediawiki.action.view.metadata.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
M resources/src/mediawiki.special/mediawiki.special.preferences.js
M
resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
M resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
M resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
M resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
M resources/src/mediawiki/api/rollback.js
M resources/src/mediawiki/api/upload.js
M resources/src/mediawiki/htmlform/hide-if.js
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
M resources/src/mediawiki/mediawiki.RegExp.js
M resources/src/mediawiki/mediawiki.Title.js
M resources/src/mediawiki/mediawiki.debug.js
M resources/src/mediawiki/mediawiki.feedback.js
M resources/src/mediawiki/mediawiki.jqueryMsg.js
M resources/src/mediawiki/mediawiki.js
M resources/src/mediawiki/mediawiki.notification.js
M resources/src/mediawiki/mediawiki.requestIdleCallback.js
M resources/src/mediawiki/mediawiki.searchSuggest.js
M resources/src/mediawiki/mediawiki.toc.js
M resources/src/mediawiki/page/patrol.ajax.js
M resources/src/mediawiki/page/rollback.js
M tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
M tests/selenium/wdio.conf.js
41 files changed, 178 insertions(+), 189 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/60/365960/1
diff --git a/mw-config/config.js b/mw-config/config.js
index 8b2d6e5..c745ce4 100644
--- a/mw-config/config.js
+++ b/mw-config/config.js
@@ -4,7 +4,7 @@
function syncText() {
var value = $( this ).val()
- .replace( /[\[\]\{\}|#<>%+? ]/g, '_' )
+ .replace( /[\[\]{}|#<>%+? ]/g, '_' ) //
eslint-disable-line no-useless-escape
.replace( /&/, '&' )
.replace( /__+/g, '_' )
.replace( /^_+/, '' )
@@ -14,17 +14,13 @@
}
// Set up the help system
- $( '.config-help-field-data' )
- .hide()
- .closest( '.config-help-field-container' )
- .find( '.config-help-field-hint' )
- .show()
- .click( function () {
- $( this )
- .closest(
'.config-help-field-container' )
- .find(
'.config-help-field-data' )
-
.slideToggle( 'fast' );
- } );
+ $( '.config-help-field-data' ).hide()
+ .closest( '.config-help-field-container' ).find(
'.config-help-field-hint' )
+ .show()
+ .click( function () {
+ $( this ).closest(
'.config-help-field-container' ).find( '.config-help-field-data' )
+ .slideToggle( 'fast' );
+ } );
// Show/hide code for DB-specific options
// FIXME: Do we want slow, fast, or even non-animated
(instantaneous) showing/hiding here?
diff --git a/package.json b/package.json
index fe3c910..022910a 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"grunt-banana-checker": "0.6.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-watch": "1.0.0",
- "grunt-eslint": "19.0.0",
+ "grunt-eslint": "20.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-karma": "2.0.0",
"grunt-stylelint": "0.7.0",
diff --git a/resources/src/jquery/jquery.badge.js
b/resources/src/jquery/jquery.badge.js
index 7773866..40b3baf 100644
--- a/resources/src/jquery/jquery.badge.js
+++ b/resources/src/jquery/jquery.badge.js
@@ -64,8 +64,7 @@
if ( $badge.length ) {
$badge
.toggleClass( 'mw-badge-important',
isImportant )
- .find( '.mw-badge-content' )
- .text( text );
+ .find( '.mw-badge-content' ).text( text
);
} else {
// Otherwise, create a new badge with the
specified text and style
$badge = $( '<div class="mw-badge"></div>' )
diff --git a/resources/src/jquery/jquery.colorUtil.js
b/resources/src/jquery/jquery.colorUtil.js
index 2be1dba..a5b136d 100644
--- a/resources/src/jquery/jquery.colorUtil.js
+++ b/resources/src/jquery/jquery.colorUtil.js
@@ -42,7 +42,7 @@
// Look for rgb(num%,num%,num%)
// eslint-disable-next-line no-cond-assign
- if ( result =
/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(
color ) ) {
+ if ( result =
/rgb\(\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*\)/.exec(
color ) ) {
return [
parseFloat( result[ 1 ] ) * 2.55,
parseFloat( result[ 2 ] ) * 2.55,
diff --git a/resources/src/jquery/jquery.makeCollapsible.js
b/resources/src/jquery/jquery.makeCollapsible.js
index 5ce9b1f..aa76d6d 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -264,14 +264,15 @@
buildDefaultToggleLink = function () {
return $( '<a class="mw-collapsible-text"></a>'
)
.text( collapseText )
- .wrap( '<span
class="mw-collapsible-toggle"></span>' ).parent()
- .attr( {
- role: 'button',
- tabindex: 0
- } )
- .prepend( '<span>[</span>' )
- .append( '<span>]</span>' )
- .on( 'click.mw-collapsible
keypress.mw-collapsible', actionHandler );
+ .wrap( '<span
class="mw-collapsible-toggle"></span>' )
+ .parent()
+ .attr( {
+ role: 'button',
+ tabindex: 0
+ } )
+ .prepend( '<span>[</span>' )
+ .append( '<span>]</span>' )
+ .on( 'click.mw-collapsible
keypress.mw-collapsible', actionHandler );
};
// Check if this element has a custom position for the
toggle link
diff --git a/resources/src/jquery/jquery.mwExtension.js
b/resources/src/jquery/jquery.mwExtension.js
index 6d478bd..4bcccdd 100644
--- a/resources/src/jquery/jquery.mwExtension.js
+++ b/resources/src/jquery/jquery.mwExtension.js
@@ -11,7 +11,7 @@
},
trimRight: function ( str ) {
return str === null ?
- '' : str.toString().replace( /\s+$/, ''
);
+ '' : str.toString().replace( /\s+$/, '' );
},
ucFirst: function ( str ) {
return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
@@ -122,7 +122,7 @@
} );
mw.log.deprecate( $, 'escapeRE', function ( str ) {
- return str.replace( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' );
+ return str.replace( /([\\{}()|.?*+\-^$\[\]])/g, '\\$1' ); //
eslint-disable-line no-useless-escape
}, 'Use mediawiki.RegExp instead.' );
}( jQuery, mediaWiki ) );
diff --git a/resources/src/jquery/jquery.suggestions.js
b/resources/src/jquery/jquery.suggestions.js
index 75f1ba6..4f4edc9 100644
--- a/resources/src/jquery/jquery.suggestions.js
+++ b/resources/src/jquery/jquery.suggestions.js
@@ -19,7 +19,6 @@
* @class jQuery.plugin.suggestions
*/
- // jscs:disable checkParamNames
/**
* @method suggestions
* @chainable
@@ -94,7 +93,6 @@
* @param {boolean} [options.highlightInput=false] Whether to highlight
matched portions of the
* input or not.
*/
- // jscs:enable checkParamNames
( function ( $, mw ) {
@@ -755,7 +753,7 @@
27, // escape
13, // enter
46, // delete
- 8 // backspace
+ 8 // backspace
];
if (
context.data.keypressedCount === 0 &&
e.which ===
context.data.keypressed &&
diff --git a/resources/src/jquery/jquery.tablesorter.js
b/resources/src/jquery/jquery.tablesorter.js
index 8d019e5..ec91773 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -542,7 +542,7 @@
// Build RegEx
// Any date formated with . , ' - or /
- ts.dateRegex[ 0 ] = new RegExp(
/^\s*(\d{1,2})[\,\.\-\/'\s]{1,2}(\d{1,2})[\,\.\-\/'\s]{1,2}(\d{2,4})\s*?/i );
+ ts.dateRegex[ 0 ] = new RegExp(
/^\s*(\d{1,2})[,.\-/'\s]{1,2}(\d{1,2})[,.\-/'\s]{1,2}(\d{2,4})\s*?/i );
// Written Month name, dmy
ts.dateRegex[ 1 ] = new RegExp(
@@ -684,7 +684,7 @@
}
columnToCell = [];
- cellsInRow = ( $row[ 0 ].cells.length ) || 0; // all
cells in this row
+ cellsInRow = ( $row[ 0 ].cells.length ) || 0; // all
cells in this row
index = 0; // real cell index in this row
for ( j = 0; j < columns; index++ ) {
if ( index === cellsInRow ) {
@@ -725,7 +725,7 @@
}
ts.rgx = {
IPAddress: [
- new RegExp(
/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/ )
+ new RegExp(
/^\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}$/ )
],
currency: [
new RegExp( /(^[£$€¥]|[£$€¥]$)/ ),
@@ -736,7 +736,7 @@
new RegExp( /(https?|ftp|file):\/\// )
],
isoDate: [
- new RegExp(
/^([-+]?\d{1,4})-([01]\d)-([0-3]\d)([T\s]((([01]\d|2[0-3])(:?[0-5]\d)?|24:?00)?(:?([0-5]\d|60))?([.,]\d+)?)([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?/
),
+ new RegExp(
/^([-+]?\d{1,4})-([01]\d)-([0-3]\d)([T\s]((([01]\d|2[0-3])(:?[0-5]\d)?|24:?00)?(:?([0-5]\d|60))?([.,]\d+)?)([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?/
),
new RegExp(
/^([-+]?\d{1,4})-([01]\d)-([0-3]\d)/ )
],
usLongDate: [
@@ -1059,7 +1059,7 @@
return getParserById( id );
},
- getParsers: function () { // for table diagnosis
+ getParsers: function () { // for table diagnosis
return parsers;
}
};
diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
index 53c1fbb..2b6fc9d 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
@@ -301,8 +301,8 @@
role: 'navigation',
'aria-labelledby': 'p-lang-label'
} )
- .append( $( '<h3>' ).attr( 'id', 'p-lang-label'
).text( mw.msg( 'otherlanguages' ) ) )
- .append( $( '<div>' ).addClass( 'body'
).append( '<ul>' ) )
+ .append( $( '<h3>' ).attr( 'id',
'p-lang-label' ).text( mw.msg( 'otherlanguages' ) ) )
+ .append( $( '<div>' ).addClass( 'body'
).append( '<ul>' ) )
);
}
diff --git a/resources/src/mediawiki.action/mediawiki.action.history.js
b/resources/src/mediawiki.action/mediawiki.action.history.js
index b3b0af2..6f49fa6 100644
--- a/resources/src/mediawiki.action/mediawiki.action.history.js
+++ b/resources/src/mediawiki.action/mediawiki.action.history.js
@@ -23,8 +23,7 @@
return true;
}
- $lis
- .each( function () {
+ $lis.each( function () {
$li = $( this );
$inputs = $li.find( 'input[type="radio"]' );
$oldidRadio = $inputs.filter( '[name="oldid"]' ).eq( 0
);
@@ -97,8 +96,7 @@
// Also remove potentially conflicting id attributes
that we don't need anyway
$copyForm
.css( 'display', 'none' )
- .find( '[id]' )
- .removeAttr( 'id' )
+ .find( '[id]' ).removeAttr( 'id' )
.end()
.insertAfter( $historyCompareForm )
.submit();
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js
b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js
index a3a82d5..0d000c9 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js
+++ b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js
@@ -22,24 +22,24 @@
$col = $( '<td colspan="2"></td>' );
$link = $( '<a>' )
- .text( showText )
- .attr( {
- role: 'button',
- tabindex: 0
- } )
- .on( 'click keypress', function ( e ) {
- if (
- e.type === 'click' ||
- e.type === 'keypress' && e.which === 13
- ) {
- if ( $table.hasClass( 'collapsed' ) ) {
- $( this ).text( hideText );
- } else {
- $( this ).text( showText );
+ .text( showText )
+ .attr( {
+ role: 'button',
+ tabindex: 0
+ } )
+ .on( 'click keypress', function ( e ) {
+ if (
+ e.type === 'click' ||
+ e.type === 'keypress' && e.which === 13
+ ) {
+ if ( $table.hasClass( 'collapsed' ) ) {
+ $( this ).text( hideText );
+ } else {
+ $( this ).text( showText );
+ }
+ $table.toggleClass( 'expanded
collapsed' );
}
- $table.toggleClass( 'expanded collapsed' );
- }
- } );
+ } );
$col.append( $link );
$row.append( $col );
diff --git
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
index 2307f30..4915803 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -464,8 +464,8 @@
// Go over the items and define the correct values
$.each( filterRepresentation, function ( name, value ) {
+ // We must store all parameter values as
strings '0' or '1'
result[ filterParamNames[ name ] ] =
areAnySelected ?
- // We must store all parameter values
as strings '0' or '1'
String( Number( !value ) ) :
'0';
} );
@@ -521,10 +521,10 @@
$.each( paramRepresentation, function ( paramName,
paramValue ) {
var filterItem = paramToFilterMap[ paramName ];
+ // Flip the definition between the parameter
+ // state and the filter state
+ // This is what the 'toggleSelected' value of
the filter is
result[ filterItem.getName() ] = areAnySelected
?
- // Flip the definition between the
parameter
- // state and the filter state
- // This is what the 'toggleSelected'
value of the filter is
!Number( paramValue ) :
// Otherwise, there are no selected
items in the
// group, which means the state is false
@@ -546,14 +546,14 @@
);
// Translate the parameter values into a filter
selection state
this.getItems().forEach( function ( filterItem ) {
+ // All true (either because all values are
written or the term 'all' is written)
+ // is the same as all filters set to true
result[ filterItem.getName() ] = (
- // If it is the word 'all'
- paramValues.length === 1 &&
paramValues[ 0 ] === 'all' ||
- // All values are written
- paramValues.length ===
model.getItemCount()
- ) ?
- // All true (either because all values
are written or the term 'all' is written)
- // is the same as all filters set to
true
+ // If it is the word 'all'
+ paramValues.length === 1 &&
paramValues[ 0 ] === 'all' ||
+ // All values are written
+ paramValues.length ===
model.getItemCount()
+ ) ?
true :
// Otherwise, the filter is selected
only if it appears in the parameter values
paramValues.indexOf(
filterItem.getParamName() ) > -1;
diff --git
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
index 64b9ac9..07d4506 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
@@ -34,8 +34,7 @@
this.inputValue = '';
this.$overlay = config.$overlay || this.$element;
- this.$body = $( '<div>' )
- .addClass(
'mw-rcfilters-ui-menuSelectWidget-body' );
+ this.$body = $( '<div>' ).addClass(
'mw-rcfilters-ui-menuSelectWidget-body' );
this.footers = [];
// Parent
diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 84a9a96..63f2d98 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -21,8 +21,8 @@
'aria-labelledby': labelFunc
} );
$fieldsets.not( '#mw-prefsection-personal' )
- .hide()
- .attr( 'aria-hidden', 'true' );
+ .hide()
+ .attr( 'aria-hidden', 'true' );
// T115692: The following is kept for backwards compatibility
with older skins
$preferences.addClass( 'jsprefs' );
@@ -72,8 +72,7 @@
$tab.attr( {
tabIndex: 0,
'aria-selected': 'true'
- } )
- .focus()
+ } ).focus()
.parent().addClass( 'selected' );
$preferences.children( 'fieldset'
).hide().attr( 'aria-hidden', 'true' );
@@ -107,10 +106,10 @@
function detectHash() {
var hash = location.hash,
matchedElement, parentSection;
- if ( hash.match( /^#mw-prefsection-[\w\-]+/ ) ) {
+ if ( hash.match( /^#mw-prefsection-[\w-]+/ ) ) {
mw.storage.session.remove(
'mwpreferences-prevTab' );
switchPrefTab( hash.replace(
'#mw-prefsection-', '' ) );
- } else if ( hash.match( /^#mw-[\w\-]+/ ) ) {
+ } else if ( hash.match( /^#mw-[\w-]+/ ) ) {
matchedElement = document.getElementById(
hash.slice( 1 ) );
parentSection = $( matchedElement ).closest(
'.prefsection' );
if ( parentSection.length ) {
@@ -133,14 +132,14 @@
) {
$( window ).on( 'hashchange', function () {
var hash = location.hash;
- if ( hash.match( /^#mw-[\w\-]+/ ) ) {
+ if ( hash.match( /^#mw-[\w-]+/ ) ) {
detectHash();
} else if ( hash === '' ) {
switchPrefTab( 'personal', 'noHash' );
}
} )
- // Run the function immediately to select the proper
tab on startup.
- .trigger( 'hashchange' );
+ // Run the function immediately to select the
proper tab on startup.
+ .trigger( 'hashchange' );
// In older browsers we'll bind a click handler as fallback.
// We must not have onhashchange *and* the click handlers,
otherwise
// the click handler calls switchPrefTab() which sets the hash
value,
diff --git
a/resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
b/resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
index 9518283..648bf67 100644
---
a/resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
+++
b/resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
@@ -56,8 +56,7 @@
piprop: 'thumbnail',
pithumbsize: 300,
formatversion: 2
- } )
- .done( function ( resp ) {
+ } ).done( function ( resp ) {
var results = ( resp.query && resp.query.pages ) ?
resp.query.pages : false,
multimediaWidgetTemplate;
diff --git a/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
b/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
index ad49a42..a7a3bd3 100644
--- a/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
+++ b/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
@@ -412,7 +412,7 @@
if ( v.normalize ) {
v = v.normalize();
}
- re = new RegExp( '^\\s*' + v.replace(
/([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' ), 'i' );
+ re = new RegExp( '^\\s*' + v.replace(
/([\\{}()|.?*+\-^$\[\]])/g, '\\$1' ), 'i' ); // eslint-disable-line
no-useless-escape
for ( k in this.values ) {
k = +k;
if ( !isNaN( k ) && re.test( this.values[ k ] ) ) {
diff --git
a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
index 1cc168a..08266f0 100644
---
a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
+++
b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
@@ -208,7 +208,7 @@
var queryValue = this.query.getValue().trim();
if ( queryValue.match( this.externalLinkUrlProtocolsRegExp ) ) {
- queryValue = queryValue.match( /.+\/([^\/]+)/ )[ 1 ];
+ queryValue = queryValue.match( /.+\/([^/]+)/ )[ 1 ];
}
return queryValue;
};
diff --git a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
index c5a2dd4..b91617e 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
@@ -229,14 +229,20 @@
);
currentMonth.add( 1, 'month' );
}
- // Shuffle the array to display months in
columns rather than rows.
+ // Shuffle the array to display months in
columns rather than rows:
+ // | Jan | Jul |
+ // | Feb | Aug |
+ // | Mar | Sep |
+ // | Apr | Oct |
+ // | May | Nov |
+ // | Jun | Dec |
items = [
- items[ 0 ], items[ 6 ], // |
January | July |
- items[ 1 ], items[ 7 ], // |
February | August |
- items[ 2 ], items[ 8 ], // |
March | September |
- items[ 3 ], items[ 9 ], // |
April | October |
- items[ 4 ], items[ 10 ], // | May
| November |
- items[ 5 ], items[ 11 ] // | June
| December |
+ items[ 0 ], items[ 6 ],
+ items[ 1 ], items[ 7 ],
+ items[ 2 ], items[ 8 ],
+ items[ 3 ], items[ 9 ],
+ items[ 4 ], items[ 10 ],
+ items[ 5 ], items[ 11 ]
];
break;
diff --git a/resources/src/mediawiki/api/rollback.js
b/resources/src/mediawiki/api/rollback.js
index cdc4dbf..322143d 100644
--- a/resources/src/mediawiki/api/rollback.js
+++ b/resources/src/mediawiki/api/rollback.js
@@ -19,8 +19,7 @@
title: String( page ),
user: user,
uselang: mw.config.get( 'wgUserLanguage' )
- }, params ) )
- .then( function ( data ) {
+ }, params ) ).then( function ( data ) {
return data.rollback;
} );
}
diff --git a/resources/src/mediawiki/api/upload.js
b/resources/src/mediawiki/api/upload.js
index 219dfb8..4a2895d 100644
--- a/resources/src/mediawiki/api/upload.js
+++ b/resources/src/mediawiki/api/upload.js
@@ -430,16 +430,16 @@
upload = this.uploadWithFormData( file, data );
return upload.then(
- null,
- // If the call fails, we may want to
try again...
- retries === 0 ? null : retry,
- function ( fraction ) {
- // Since we're only uploading
small parts of a file, we
- // need to adjust the reported
progress to reflect where
- // we actually are in the
combined upload
- return ( start + fraction * (
end - start ) ) / file.size;
- }
- ).promise( { abort: upload.abort } );
+ null,
+ // If the call fails, we may want to try
again...
+ retries === 0 ? null : retry,
+ function ( fraction ) {
+ // Since we're only uploading small
parts of a file, we
+ // need to adjust the reported progress
to reflect where
+ // we actually are in the combined
upload
+ return ( start + fraction * ( end -
start ) ) / file.size;
+ }
+ ).promise( { abort: upload.abort } );
},
/**
diff --git a/resources/src/mediawiki/htmlform/hide-if.js
b/resources/src/mediawiki/htmlform/hide-if.js
index 3bf75ae..6d3c9fd 100644
--- a/resources/src/mediawiki/htmlform/hide-if.js
+++ b/resources/src/mediawiki/htmlform/hide-if.js
@@ -20,7 +20,7 @@
*/
function hideIfGetField( $el, name ) {
var $found, $p, $widget,
- suffix = name.replace( /^([^\[]+)/, '[$1]' );
+ suffix = name.replace( /^([^[]+)/, '[$1]' );
function nameFilter() {
return this.name === name ||
diff --git
a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
index 7a1fa7f..ac2bb02 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
@@ -356,9 +356,9 @@
*/
mw.ForeignStructuredUpload.BookletLayout.prototype.saveFile = function
() {
var title = mw.Title.newFromText(
- this.getFilename(),
- mw.config.get( 'wgNamespaceIds' ).file
- );
+ this.getFilename(),
+ mw.config.get( 'wgNamespaceIds' ).file
+ );
return this.uploadPromise
.then( this.validateFilename.bind( this, title ) )
diff --git a/resources/src/mediawiki/mediawiki.RegExp.js
b/resources/src/mediawiki/mediawiki.RegExp.js
index 1da4ab4..91cdc2d 100644
--- a/resources/src/mediawiki/mediawiki.RegExp.js
+++ b/resources/src/mediawiki/mediawiki.RegExp.js
@@ -16,7 +16,7 @@
* @return {string} Escaped string
*/
escape: function ( str ) {
- return str.replace( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1'
);
+ return str.replace( /([\\{}()|.?*+\-^$\[\]])/g, '\\$1'
); // eslint-disable-line no-useless-escape
}
};
}( mediaWiki ) );
diff --git a/resources/src/mediawiki/mediawiki.Title.js
b/resources/src/mediawiki/mediawiki.Title.js
index 253e0ef..86846d9 100644
--- a/resources/src/mediawiki/mediawiki.Title.js
+++ b/resources/src/mediawiki/mediawiki.Title.js
@@ -208,13 +208,13 @@
},
// brackets, greater than
{
- pattern: /[\]\}>]/g,
+ pattern: /[}]>]/g,
replace: ')',
generalRule: true
},
// brackets, lower than
{
- pattern: /[\[\{<]/g,
+ pattern: /[{[<]/g,
replace: '(',
generalRule: true
},
@@ -616,7 +616,7 @@
}
// Any remaining initial :s are illegal.
- title = title.replace( /^\:+/, '' );
+ title = title.replace( /^:+/, '' );
return Title.newFromText( title, namespace );
};
@@ -654,16 +654,16 @@
thumbPhpRegex = /thumb\.php/,
regexes = [
// Thumbnails
-
/\/[a-f0-9]\/[a-f0-9]{2}\/([^\s\/]+)\/[^\s\/]+-[^\s\/]*$/,
+
/\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)\/[^\s/]+-[^\s/]*$/,
// Full size images
- /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s\/]+)$/,
+ /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)$/,
// Thumbnails in non-hashed upload directories
-
/\/([^\s\/]+)\/[^\s\/]+-(?:\1|thumbnail)[^\s\/]*$/,
+ /\/([^\s/]+)\/[^\s/]+-(?:\1|thumbnail)[^\s/]*$/,
// Full-size images in non-hashed upload
directories
- /\/([^\s\/]+)$/
+ /\/([^\s/]+)$/
],
recount = regexes.length;
diff --git a/resources/src/mediawiki/mediawiki.debug.js
b/resources/src/mediawiki/mediawiki.debug.js
index 3c1a668..939b841 100644
--- a/resources/src/mediawiki/mediawiki.debug.js
+++ b/resources/src/mediawiki/mediawiki.debug.js
@@ -118,8 +118,7 @@
return $( '<div>' ).prop( {
id: 'mw-debug-' + id,
className: 'mw-debug-bit'
- } )
- .appendTo( $bits );
+ } ).appendTo( $bits );
}
/**
@@ -156,8 +155,8 @@
id: 'mw-debug-' + id,
className: 'mw-debug-bit
mw-debug-panelink'
} )
- .append( paneLabel( id, text ) )
- .appendTo( $bits );
+ .append( paneLabel( id, text ) )
+ .appendTo( $bits );
}
paneTriggerBitDiv( 'console', 'Console',
this.data.log.length );
@@ -288,7 +287,7 @@
.append( $( '<th>SQL</th>' ) )
.append( $( '<th>Time</th>' ).css( 'width',
'8em' ) )
.append( $( '<th>Call</th>' ).css( 'width',
'18em' ) )
- .appendTo( $table );
+ .appendTo( $table );
for ( i = 0, length = this.data.queries.length; i <
length; i += 1 ) {
query = this.data.queries[ i ];
@@ -298,7 +297,7 @@
.append( $( '<td>' ).text( query.sql ) )
.append( $( '<td class="stats">'
).text( ( query.time * 1000 ).toFixed( 4 ) + 'ms' ) )
.append( $( '<td>' ).text( query[
'function' ] ) )
- .appendTo( $table );
+ .appendTo( $table );
}
return $table;
diff --git a/resources/src/mediawiki/mediawiki.feedback.js
b/resources/src/mediawiki/mediawiki.feedback.js
index f0e13b4..2d55094 100644
--- a/resources/src/mediawiki/mediawiki.feedback.js
+++ b/resources/src/mediawiki/mediawiki.feedback.js
@@ -285,12 +285,12 @@
*/
mw.Feedback.Dialog.prototype.validateFeedbackForm = function () {
var isValid = (
- (
- !this.useragentMandatory ||
- this.useragentCheckbox.isSelected()
- ) &&
- this.feedbackSubjectInput.getValue()
- );
+ (
+ !this.useragentMandatory ||
+ this.useragentCheckbox.isSelected()
+ ) &&
+ this.feedbackSubjectInput.getValue()
+ );
this.actions.setAbilities( { submit: isValid } );
};
diff --git a/resources/src/mediawiki/mediawiki.jqueryMsg.js
b/resources/src/mediawiki/mediawiki.jqueryMsg.js
index 6d3b4f0..e1681fa 100644
--- a/resources/src/mediawiki/mediawiki.jqueryMsg.js
+++ b/resources/src/mediawiki/mediawiki.jqueryMsg.js
@@ -491,10 +491,12 @@
// recursive functions seem not to work in all browsers
then. (Tested IE6-7, Opera, Safari, FF)
// This may be because, to save code, memoization was
removed
+ /* eslint-disable no-useless-escape */
regularLiteral = makeRegexParser( /^[^{}\[\]$<\\]/ );
regularLiteralWithoutBar = makeRegexParser(
/^[^{}\[\]$\\|]/ );
regularLiteralWithoutSpace = makeRegexParser(
/^[^{}\[\]$\s]/ );
regularLiteralWithSquareBrackets = makeRegexParser(
/^[^{}$\\]/ );
+ /* eslint-enable no-useless-escape */
backslash = makeStringParser( '\\' );
doubleQuote = makeStringParser( '"' );
@@ -811,7 +813,7 @@
templateName = transform(
// see $wgLegalTitleChars
// not allowing : due to the need to catch
"PLURAL:$1"
- makeRegexParser( /^[
!"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/ ),
+ makeRegexParser( /^[
!"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/ ),
function ( result ) { return result.toString();
}
);
function templateParam() {
@@ -1142,8 +1144,7 @@
$el.attr( {
role: 'button',
tabindex: 0
- } )
- .on( 'click keypress', function ( e ) {
+ } ).on( 'click keypress', function ( e
) {
if (
e.type === 'click' ||
e.type === 'keypress'
&& e.which === 13
@@ -1354,7 +1355,7 @@
// Replace the default message parser with jqueryMsg
oldParser = mw.Message.prototype.parser;
mw.Message.prototype.parser = function () {
- if ( this.format === 'plain' || !/\{\{|[\[<>&]/.test(
this.map.get( this.key ) ) ) {
+ if ( this.format === 'plain' || !/\{\{|[<>[&]/.test(
this.map.get( this.key ) ) ) {
// Fall back to mw.msg's simple parser
return oldParser.apply( this );
}
diff --git a/resources/src/mediawiki/mediawiki.js
b/resources/src/mediawiki/mediawiki.js
index 18f7f0a..c5989c0 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -118,11 +118,11 @@
function setGlobalMapValue( map, key, value ) {
map.values[ key ] = value;
log.deprecate(
- window,
- key,
- value,
- // Deprecation notice for mw.config globals
(T58550, T72470)
- map === mw.config && 'Use mw.config instead.'
+ window,
+ key,
+ value,
+ // Deprecation notice for mw.config globals (T58550,
T72470)
+ map === mw.config && 'Use mw.config instead.'
);
}
diff --git a/resources/src/mediawiki/mediawiki.notification.js
b/resources/src/mediawiki/mediawiki.notification.js
index d36c4a0..dfacfc6 100644
--- a/resources/src/mediawiki/mediawiki.notification.js
+++ b/resources/src/mediawiki/mediawiki.notification.js
@@ -35,7 +35,7 @@
if ( options.tag ) {
// Sanitize options.tag before it is used by any code.
(Including Notification class methods)
- options.tag = options.tag.replace( /[ _\-]+/g, '-'
).replace( /[^\-a-z0-9]+/ig, '' );
+ options.tag = options.tag.replace( /[ _-]+/g, '-'
).replace( /[^-a-z0-9]+/ig, '' );
if ( options.tag ) {
$notification.addClass( 'mw-notification-tag-'
+ options.tag );
} else {
@@ -45,7 +45,7 @@
if ( options.type ) {
// Sanitize options.type
- options.type = options.type.replace( /[ _\-]+/g, '-'
).replace( /[^\-a-z0-9]+/ig, '' );
+ options.type = options.type.replace( /[ _-]+/g, '-'
).replace( /[^-a-z0-9]+/ig, '' );
$notification.addClass( 'mw-notification-type-' +
options.type );
}
diff --git a/resources/src/mediawiki/mediawiki.requestIdleCallback.js
b/resources/src/mediawiki/mediawiki.requestIdleCallback.js
index 6a6aa15..650092b 100644
--- a/resources/src/mediawiki/mediawiki.requestIdleCallback.js
+++ b/resources/src/mediawiki/mediawiki.requestIdleCallback.js
@@ -44,8 +44,7 @@
* by that time.
*/
mw.requestIdleCallback = window.requestIdleCallback ?
- // Bind because it throws TypeError if context is not window
- window.requestIdleCallback.bind( window ) :
+ window.requestIdleCallback.bind( window ) : // Bind because it
throws TypeError if context is not window
mw.requestIdleCallbackInternal;
// Note: Polyfill was previously disabled due to
// https://bugs.chromium.org/p/chromium/issues/detail?id=647870
diff --git a/resources/src/mediawiki/mediawiki.searchSuggest.js
b/resources/src/mediawiki/mediawiki.searchSuggest.js
index bcb6c33..1c1150e 100644
--- a/resources/src/mediawiki/mediawiki.searchSuggest.js
+++ b/resources/src/mediawiki/mediawiki.searchSuggest.js
@@ -87,9 +87,9 @@
*/
function getInputLocation( context ) {
return context.config.$region
- .closest( 'form' )
- .find( '[data-search-loc]' )
- .data( 'search-loc' ) || 'header';
+ .closest( 'form' )
+ .find( '[data-search-loc]' )
+ .data( 'search-loc' ) || 'header';
}
/**
@@ -252,8 +252,7 @@
var $this = $( this );
$this
.data( 'suggestions-context' )
- .data.$container
- .css( 'fontSize', $this.css(
'fontSize' ) );
+ .data.$container.css( 'fontSize',
$this.css( 'fontSize' ) );
} );
// Ensure that the thing is actually present!
diff --git a/resources/src/mediawiki/mediawiki.toc.js
b/resources/src/mediawiki/mediawiki.toc.js
index 53e8d93..5e10a5b 100644
--- a/resources/src/mediawiki/mediawiki.toc.js
+++ b/resources/src/mediawiki/mediawiki.toc.js
@@ -45,8 +45,8 @@
$tocToggleLink
.wrap( '<span
class="toctoggle"></span>' )
.parent()
- .prepend( ' [' )
- .append( '] ' )
+ .prepend( ' [' )
+ .append( '] ' )
);
if ( hideToc ) {
diff --git a/resources/src/mediawiki/page/patrol.ajax.js
b/resources/src/mediawiki/page/patrol.ajax.js
index 6d6d46d..d8fb249 100644
--- a/resources/src/mediawiki/page/patrol.ajax.js
+++ b/resources/src/mediawiki/page/patrol.ajax.js
@@ -33,8 +33,7 @@
formatversion: 2,
action: 'patrol',
rcid: rcid
- } )
- .done( function ( data ) {
+ } ).done( function ( data ) {
var title;
// Remove all patrollinks from the page
(including any spinners inside).
$patrolLinks.closest( '.patrollink' ).remove();
@@ -46,8 +45,7 @@
// This should never happen as errors
should trigger fail
mw.notify( mw.msg(
'markedaspatrollederrornotify' ), { type: 'error' } );
}
- } )
- .fail( function ( error ) {
+ } ).fail( function ( error ) {
$spinner.remove();
// Restore the patrol link. This allows the
user to try again
// (or open it in a new window, bypassing this
ajax module).
diff --git a/resources/src/mediawiki/page/rollback.js
b/resources/src/mediawiki/page/rollback.js
index d94b158..6db518d 100644
--- a/resources/src/mediawiki/page/rollback.js
+++ b/resources/src/mediawiki/page/rollback.js
@@ -45,8 +45,8 @@
$( e.delegateTarget ).remove();
}, function ( errorCode, data ) {
var message = data && data.error &&
data.error.messageHtml ?
- $.parseHTML(
data.error.messageHtml ) :
- mw.msg( 'rollbackfailed' ),
+ $.parseHTML(
data.error.messageHtml ) :
+ mw.msg(
'rollbackfailed' ),
type = errorCode ===
'alreadyrolled' ? 'warn' : 'error';
mw.notify( message, {
diff --git a/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
b/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
index 5c1be67..8555a7e 100644
--- a/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
@@ -160,9 +160,9 @@
byteLimitTest( {
description: 'Input filter that increases the length',
$input: $( '<input>' ).attr( 'type', 'text' )
- .byteLimit( 10, function ( text ) {
- return 'prefix' + text;
- } ),
+ .byteLimit( 10, function ( text ) {
+ return 'prefix' + text;
+ } ),
sample: simpleSample,
// Prefix adds 6 characters, limit is reached after 4
expected: '1234'
@@ -172,9 +172,9 @@
byteLimitTest( {
description: 'Input filter of which the base exceeds the limit',
$input: $( '<input>' ).attr( 'type', 'text' )
- .byteLimit( 3, function ( text ) {
- return 'prefix' + text;
- } ),
+ .byteLimit( 3, function ( text ) {
+ return 'prefix' + text;
+ } ),
sample: simpleSample,
hasLimit: true,
limit: 6, // 'prefix' length
diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
index 53d29cf..0c91e43 100644
--- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
@@ -206,16 +206,16 @@
QUnit.test( 'mw-made-collapsible data added', function ( assert ) {
var $collapsible = prepareCollapsible(
- '<div>' + loremIpsum + '</div>'
- );
+ '<div>' + loremIpsum + '</div>'
+ );
assert.equal( $collapsible.data( 'mw-made-collapsible' ), true,
'mw-made-collapsible data present' );
} );
QUnit.test( 'mw-collapsible added when missing', function ( assert ) {
var $collapsible = prepareCollapsible(
- '<div>' + loremIpsum + '</div>'
- );
+ '<div>' + loremIpsum + '</div>'
+ );
assert.assertTrue( $collapsible.hasClass( 'mw-collapsible' ),
'mw-collapsible class present' );
} );
@@ -223,8 +223,8 @@
QUnit.test( 'mw-collapsed added when missing', function ( assert ) {
var $collapsible = prepareCollapsible(
'<div>' + loremIpsum + '</div>',
- { collapsed: true }
- );
+ { collapsed: true }
+ );
assert.assertTrue( $collapsible.hasClass( 'mw-collapsed' ),
'mw-collapsed class present' );
} );
diff --git
a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
index 854e4b1..4ee8038 100644
--- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
+++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
@@ -104,8 +104,11 @@
'action=options&format=json&formatversion=2&optionname=foo%7Cbar%3Dquux&token=%2B%5C'
] ) !== -1 ) {
assert.ok( true, 'Repond to ' +
request.requestBody );
- request.respond( 200, { 'Content-Type':
'application/json' },
- '{ "options": "success" }' );
+ request.respond(
+ 200,
+ { 'Content-Type': 'application/json' },
+ '{ "options": "success" }'
+ );
} else {
assert.ok( false, 'Unexpected request: ' +
request.requestBody );
}
diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
index e10a7fa..2361f70 100644
--- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
+++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
@@ -335,8 +335,7 @@
'X-Foo': 'Bar'
}
}
- )
- .then( function () {
+ ).then( function () {
assert.equal( test.server.requests[ 0 ].requestHeaders[
'X-Foo' ], 'Bar', 'Header sent' );
return api.postWithToken( 'csrf',
@@ -345,8 +344,7 @@
assert.ok( false, 'This parameter
cannot be a callback' );
}
);
- } )
- .then( function ( data ) {
+ } ).then( function ( data ) {
assert.equal( data.example, 'quux' );
assert.equal( test.server.requests.length, 2, 'Request
made' );
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
index 3c77a00..db51fb3 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
@@ -204,7 +204,7 @@
);
assert.equal(
formatParse( 'external-link-plural', 2,
'http://example.org' ),
- 'Foo <a href=\"http://example.org\">two</a> things.',
+ 'Foo <a href="http://example.org">two</a> things.',
'Link is expanded inside an explicit plural form and is
not escaped html'
);
assert.equal(
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
index 30654fa..985ff92 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
@@ -131,13 +131,13 @@
mw.loader.implement( 'test.promise', [ QUnit.fixurl(
mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' )
] );
return mw.loader.using( 'test.promise' )
- .done( function () {
- assert.strictEqual( isAwesomeDone, true, 'test.promise
module should\'ve caused isAwesomeDone to be true' );
- delete mw.loader.testCallback;
- } )
- .fail( function () {
- assert.ok( false, 'Error callback fired while
loader.using "test.promise" module' );
- } );
+ .done( function () {
+ assert.strictEqual( isAwesomeDone, true,
'test.promise module should\'ve caused isAwesomeDone to be true' );
+ delete mw.loader.testCallback;
+ } )
+ .fail( function () {
+ assert.ok( false, 'Error callback fired while
loader.using "test.promise" module' );
+ } );
} );
// Covers mw.loader#sortDependencies (with native Set if available)
@@ -157,7 +157,7 @@
assert.ok( /Circular/.test( String( e ) ),
'Detect circular dependency' );
}
)
- .always( done );
+ .always( done );
} );
// @covers mw.loader#sortDependencies (with fallback shim)
@@ -187,7 +187,7 @@
assert.ok( /Circular/.test( String( e ) ),
'Detect circular dependency' );
}
)
- .always( done );
+ .always( done );
} );
QUnit.test( '.load() - Error: Circular dependency', function ( assert )
{
@@ -863,8 +863,7 @@
}
};
} );
- return mw.loader.using( [ 'test.require1', 'test.require2',
'test.require3', 'test.require4' ] )
- .then( function ( require ) {
+ return mw.loader.using( [ 'test.require1', 'test.require2',
'test.require3', 'test.require4' ] ).then( function ( require ) {
var module1, module2, module3, module4;
module1 = require( 'test.require1' );
diff --git a/tests/selenium/wdio.conf.js b/tests/selenium/wdio.conf.js
index c8fb8a7..f3e4877 100644
--- a/tests/selenium/wdio.conf.js
+++ b/tests/selenium/wdio.conf.js
@@ -1,7 +1,6 @@
-/* eslint comma-dangle: 0 */
-/* eslint no-undef: "error" */
-/* eslint no-console: 0 */
/* eslint-env node */
+/* eslint no-undef: "error" */
+/* eslint-disable no-console, comma-dangle */
'use strict';
const path = require( 'path' );
@@ -114,12 +113,12 @@
// with "/", then the base url gets prepended.
baseUrl: (
process.env.MW_SERVER === undefined ?
- 'http://127.0.0.1:8080' :
- process.env.MW_SERVER
+ 'http://127.0.0.1:8080' :
+ process.env.MW_SERVER
) + (
process.env.MW_SCRIPT_PATH === undefined ?
- '/w' :
- process.env.MW_SCRIPT_PATH
+ '/w' :
+ process.env.MW_SCRIPT_PATH
),
//
// Default timeout for all waitFor* commands.
--
To view, visit https://gerrit.wikimedia.org/r/365960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits