build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.18.1

Change-Id: I5e3687be2b197134578126e1b890ee37dbc1bc1b
This commit is contained in:
James D. Forrester 2021-02-03 15:20:06 -08:00
parent b8e7da5aa4
commit 5a622b6a2e
22 changed files with 14099 additions and 13824 deletions

View file

@ -6,7 +6,7 @@
"ContributionsLookup",
"UserNameUtils"
],
"mode" : "me"
"mode": "me"
},
{
"path": "/coredev/v0/user/{user}/contributions",
@ -15,7 +15,7 @@
"ContributionsLookup",
"UserNameUtils"
],
"mode" : "user"
"mode": "user"
},
{
"path": "/coredev/v0/me/contributions/count",
@ -24,7 +24,7 @@
"ContributionsLookup",
"UserNameUtils"
],
"mode" : "me"
"mode": "me"
},
{
"path": "/coredev/v0/user/{user}/contributions/count",
@ -33,7 +33,7 @@
"ContributionsLookup",
"UserNameUtils"
],
"mode" : "user"
"mode": "user"
},
{
"path": "/coredev/v0/revision/{id}",

View file

@ -3,7 +3,7 @@
"--categories": "maintenance/jsduck/categories.json",
"--eg-iframe": "maintenance/jsduck/eg-iframe.html",
"--tags": "maintenance/jsduck/custom_tags.rb",
"--warnings": ["-nodoc(class,public)"],
"--warnings": [ "-nodoc(class,public)" ],
"--builtin-classes": true,
"--processes": "0",
"--warnings-exit-nonzero": true,

View file

@ -31,7 +31,7 @@
"name": "ct_tag",
"comment": "Tag applied, this will go away and be replaced with ct_tag_id",
"type": "string",
"options": { "length": 255, "notnull": true, "default": "" }
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "ct_params",

View file

@ -37,7 +37,7 @@
},
{
"name": "API",
"classes": ["mw.Api*", "mw.ForeignApi*", "mw.Rest*", "mw.ForeignRest*" ]
"classes": [ "mw.Api*", "mw.ForeignApi*", "mw.Rest*", "mw.ForeignRest*" ]
},
{
"name": "Language",
@ -127,11 +127,11 @@
},
{
"name": "jQuery",
"classes": ["jQuery", "jQuery.Event", "jQuery.Callbacks", "jQuery.Promise", "jQuery.Deferred", "jQuery.jqXHR", "QUnit"]
"classes": [ "jQuery", "jQuery.Event", "jQuery.Callbacks", "jQuery.Promise", "jQuery.Deferred", "jQuery.jqXHR", "QUnit" ]
},
{
"name": "JavaScript",
"classes": ["Array", "Boolean", "Date", "Function", "Number", "Object", "RegExp", "String"]
"classes": [ "Array", "Boolean", "Date", "Function", "Number", "Object", "RegExp", "String" ]
}
]
}

View file

@ -1002,7 +1002,7 @@
{ "name": "ug_group", "columns": [ "ug_group" ], "unique": false },
{ "name": "ug_expiry", "columns": [ "ug_expiry" ], "unique": false }
],
"pk": [ "ug_user", "ug_group"]
"pk": [ "ug_user", "ug_group" ]
},
{
"name": "querycache_info",
@ -1604,7 +1604,7 @@
"name": "cl_timestamp",
"comment": "This isn't really used at present. Provided for an optional sorting method by approximate addition time.",
"type": "datetimetz",
"options": { "notnull": true, "PlatformOptions": {"version": true} }
"options": { "notnull": true, "PlatformOptions": { "version": true } }
},
{
"name": "cl_collation",

27806
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@
"@wdio/sync": "6.1.8",
"api-testing": "1.3.0",
"dotenv": "8.2.0",
"eslint-config-wikimedia": "0.17.0",
"eslint-config-wikimedia": "0.18.1",
"grunt": "1.3.0",
"grunt-banana-checker": "0.9.0",
"grunt-contrib-copy": "1.0.0",

View file

@ -84,6 +84,7 @@ module.exports = ( function () {
return '*';
}
// eslint-disable-next-line compat/compat
origin = location.protocol + '//' + location.hostname;
if ( location.port ) {
origin += ':' + location.port;

View file

@ -198,7 +198,7 @@
// Use Function.prototype#call to force an exception on Firefox,
// which doesn't define console#table but doesn't complain if you
// try to invoke it.
// eslint-disable-next-line no-useless-call
// eslint-disable-next-line no-useless-call, compat/compat
console.table.call( console, data );
return;
} catch ( e ) {}

View file

@ -162,6 +162,8 @@ function loadSearchModule( moduleName ) {
//
// Vue search isn't loaded through this function so we are only collecting
// legacy search performance metrics here.
/* eslint-disable compat/compat */
var shouldTestSearch = !!( moduleName === 'mediawiki.searchSuggest' &&
mw.config.get( 'skin' ) === 'vector' &&
window.performance &&
@ -170,6 +172,7 @@ function loadSearchModule( moduleName ) {
performance.getEntriesByName ),
loadStartMark = 'mwVectorLegacySearchLoadStart',
loadEndMark = 'mwVectorLegacySearchLoadEnd';
/* eslint-enable compat/compat */
function requestSearchModule() {
if ( shouldTestSearch ) {

View file

@ -691,6 +691,7 @@ Controller.prototype._doLiveUpdate = function () {
* @private
*/
Controller.prototype._shouldCheckForNewChanges = function () {
// eslint-disable-next-line compat/compat
return !document.hidden &&
!this.filtersModel.hasConflict() &&
!this.changesListModel.getNewChangesExist() &&

View file

@ -12,6 +12,7 @@
// T251544: Collect search performance metrics to compare Vue search with
// mediawiki.searchSuggest performance. Marks and Measures will only be
// recorded on the Vector skin.
/* eslint-disable compat/compat */
shouldTestSearch = !!( mw.config.get( 'skin' ) === 'vector' &&
window.performance &&
window.requestAnimationFrame &&
@ -19,6 +20,7 @@
performance.measure &&
performance.getEntriesByName &&
performance.clearMarks ),
/* eslint-enable compat/compat */
loadStartMark = 'mwVectorLegacySearchLoadStart',
queryMark = 'mwVectorLegacySearchQuery',
renderMark = 'mwVectorLegacySearchRender',
@ -119,6 +121,7 @@
performance.clearMarks( queryMark );
}
// eslint-disable-next-line compat/compat
performance.mark( queryMark );
}

View file

@ -247,6 +247,7 @@
* @return {boolean}
*/
function hasFileAPI() {
// eslint-disable-next-line compat/compat
return window.FileReader !== undefined;
}
@ -300,6 +301,7 @@
* @param {Function} callbackBinary
*/
function fetchPreview( file, callback, callbackBinary ) {
// eslint-disable-next-line compat/compat
var reader = new FileReader();
if ( callbackBinary && 'readAsBinaryString' in reader ) {
// To fetch JPEG metadata we need a binary string; start there.

View file

@ -60,7 +60,9 @@
this.cache = config.cache;
this.api = config.api || new mw.Api();
// Supports: IE10, FF28, Chrome23
// eslint-disable-next-line compat/compat
this.compare = window.Intl && Intl.Collator ?
// eslint-disable-next-line compat/compat
new Intl.Collator(
mw.language.bcp47( mw.config.get( 'wgContentLanguage' ) ),
{ sensitivity: 'base' }

8
tests/.eslintrc.json Normal file
View file

@ -0,0 +1,8 @@
{
"extends": [
"wikimedia/server"
],
"rules": {
"compat/compat": [ "error", "last 2 chrome versions, last 2 firefox versions" ]
}
}

View file

@ -1,6 +1,5 @@
{
"extends": [
"wikimedia/server",
"wikimedia/mocha"
],
"rules": {

View file

@ -0,0 +1,13 @@
{
"rules": {
"array-bracket-spacing": "off",
"comma-spacing": "off",
"eol-last": "off",
"indent": "off",
"key-spacing": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"object-curly-spacing": "off",
"strict": "off"
}
}

View file

@ -0,0 +1,6 @@
{
"rules": {
"indent": "off",
"eol-last": "off"
}
}

View file

@ -0,0 +1,6 @@
{
"rules": {
"indent": "off",
"eol-last": "off"
}
}

View file

@ -0,0 +1,5 @@
{
"rules": {
"indent": "off"
}
}

View file

@ -164,7 +164,9 @@
return;
}
// eslint-disable-next-line compat/compat
this.nativeSet = window.Set;
// eslint-disable-next-line compat/compat
window.Set = undefined;
mw.redefineFallbacksForTest();

View file

@ -1,21 +1,21 @@
{
"name": "wdio-mediawiki",
"version": "1.0.0",
"description": "WebdriverIO plugin for testing a MediaWiki site.",
"homepage": "https://gerrit.wikimedia.org/g/mediawiki/core/+/master/tests/selenium/wdio-mediawiki/",
"license": "MIT",
"keywords": [
"mediawiki",
"wdio-plugin"
],
"files": [
"*.js",
"specs/"
],
"engines": {
"node" : ">=10.0"
},
"dependencies": {
"mwbot": "1.0.10"
}
"name": "wdio-mediawiki",
"version": "1.0.0",
"description": "WebdriverIO plugin for testing a MediaWiki site.",
"homepage": "https://gerrit.wikimedia.org/g/mediawiki/core/+/master/tests/selenium/wdio-mediawiki/",
"license": "MIT",
"keywords": [
"mediawiki",
"wdio-plugin"
],
"files": [
"*.js",
"specs/"
],
"engines": {
"node": ">=10.0"
},
"dependencies": {
"mwbot": "1.0.10"
}
}