build: Update eslint-config-wikimedia to 0.17.0
Fix remaining instances of variable shadowing. Change-Id: I2a3840446f1fe138410249cc35be5ddf262d8e46
This commit is contained in:
parent
1c7b878c99
commit
4fc3f3af24
5 changed files with 755 additions and 874 deletions
1600
package-lock.json
generated
1600
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -22,7 +22,7 @@
|
|||
"@wdio/sauce-service": "6.1.9",
|
||||
"@wdio/sync": "6.1.8",
|
||||
"api-testing": "1.3.0",
|
||||
"eslint-config-wikimedia": "0.16.2",
|
||||
"eslint-config-wikimedia": "0.17.0",
|
||||
"grunt": "1.1.0",
|
||||
"grunt-banana-checker": "0.9.0",
|
||||
"grunt-contrib-copy": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -38,10 +38,7 @@
|
|||
* @return {string}
|
||||
*/
|
||||
function getFirstKey( obj ) {
|
||||
var key;
|
||||
for ( key in obj ) {
|
||||
return key;
|
||||
}
|
||||
return obj[ Object.keys( obj )[ 0 ] ];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1238,17 +1238,17 @@
|
|||
$CODE.profileScriptEnd();
|
||||
setAndPropagate( module, 'ready' );
|
||||
};
|
||||
nestedAddScript = function ( arr, callback, i ) {
|
||||
nestedAddScript = function ( arr, callback, j ) {
|
||||
// Recursively call queueModuleScript() in its own callback
|
||||
// for each element of arr.
|
||||
if ( i >= arr.length ) {
|
||||
if ( j >= arr.length ) {
|
||||
// We're at the end of the array
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
queueModuleScript( arr[ i ], module, function () {
|
||||
nestedAddScript( arr, callback, i + 1 );
|
||||
queueModuleScript( arr[ j ], module, function () {
|
||||
nestedAddScript( arr, callback, j + 1 );
|
||||
} );
|
||||
};
|
||||
|
||||
|
|
@ -1824,8 +1824,8 @@
|
|||
source: 'store-eval'
|
||||
} );
|
||||
// For any failed ones, fallback to requesting from network
|
||||
failed = storedNames.filter( function ( module ) {
|
||||
return registry[ module ].state === 'loading';
|
||||
failed = storedNames.filter( function ( name ) {
|
||||
return registry[ name ].state === 'loading';
|
||||
} );
|
||||
batchRequest( failed );
|
||||
} );
|
||||
|
|
@ -2289,9 +2289,9 @@
|
|||
encodedScript = '{' +
|
||||
'main:' + JSON.stringify( descriptor.script.main ) + ',' +
|
||||
'files:{' +
|
||||
Object.keys( descriptor.script.files ).map( function ( key ) {
|
||||
var value = descriptor.script.files[ key ];
|
||||
return JSON.stringify( key ) + ':' +
|
||||
Object.keys( descriptor.script.files ).map( function ( file ) {
|
||||
var value = descriptor.script.files[ file ];
|
||||
return JSON.stringify( file ) + ':' +
|
||||
( typeof value === 'function' ? value : JSON.stringify( value ) );
|
||||
} ).join( ',' ) +
|
||||
'}}';
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class HistoryPage extends Page {
|
|||
|
||||
toggleRollbackConfirmationSetting( enable ) {
|
||||
Util.waitForModuleState( 'mediawiki.api', 'ready', 5000 );
|
||||
return browser.execute( function ( enable ) {
|
||||
return browser.execute( function ( en ) {
|
||||
return new mw.Api().saveOption(
|
||||
'showrollbackconfirmation',
|
||||
enable ? '1' : '0'
|
||||
en ? '1' : '0'
|
||||
);
|
||||
}, enable );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue