build: Upgrade eslint-config-wikimedia from 0.22.1 to 0.24.0
Change-Id: I8b2864b36ffa131a2c197c8a7da532e55a0d1a7e
This commit is contained in:
parent
82a62a59aa
commit
3496296884
18 changed files with 418 additions and 561 deletions
|
|
@ -4,6 +4,9 @@
|
|||
* Recommended options from:
|
||||
* https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
|
|
|
|||
20
.vsls.json
20
.vsls.json
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vsls",
|
||||
"gitignore":"hide",
|
||||
"excludeFiles":[
|
||||
"!node_modules",
|
||||
"!vendor"
|
||||
],
|
||||
"hideFiles":[
|
||||
"!node_modules",
|
||||
"!vendor"
|
||||
]
|
||||
"$schema": "http://json.schemastore.org/vsls",
|
||||
"gitignore": "hide",
|
||||
"excludeFiles": [
|
||||
"!node_modules",
|
||||
"!vendor"
|
||||
],
|
||||
"hideFiles": [
|
||||
"!node_modules",
|
||||
"!vendor"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
926
package-lock.json
generated
926
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -21,12 +21,12 @@
|
|||
"api-testing": "1.5.1",
|
||||
"domino": "2.1.0",
|
||||
"dotenv": "8.2.0",
|
||||
"eslint-config-wikimedia": "0.22.1",
|
||||
"eslint-config-wikimedia": "0.24.0",
|
||||
"grunt": "1.5.3",
|
||||
"grunt-banana-checker": "0.10.0",
|
||||
"grunt-contrib-copy": "1.0.0",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-eslint": "24.0.0",
|
||||
"grunt-eslint": "24.0.1",
|
||||
"grunt-karma": "4.0.2",
|
||||
"grunt-stylelint": "0.18.0",
|
||||
"karma": "6.4.1",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable no-restricted-properties, no-extend-native, eqeqeq, no-bitwise */
|
||||
/* eslint-disable es-x/no-array-prototype-findindex, no-extend-native, eqeqeq, no-bitwise */
|
||||
|
||||
/**
|
||||
* Array.prototype.findIndex polyfill
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable es/no-array-from, no-undef, no-unmodified-loop-condition, eqeqeq */
|
||||
/* eslint-disable es-x/no-array-from, no-undef, no-unmodified-loop-condition, eqeqeq */
|
||||
|
||||
/**
|
||||
* Array.from polyfill
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable no-extend-native, no-bitwise, eqeqeq */
|
||||
/* eslint-disable no-extend-native, no-bitwise, eqeqeq, es-x/no-string-prototype-includes, es-x/no-array-prototype-includes */
|
||||
|
||||
/**
|
||||
* Array.prototype.includes polyfill
|
||||
|
|
|
|||
|
|
@ -410,6 +410,7 @@
|
|||
fileStr = fileReader.result;
|
||||
} else {
|
||||
// Array buffer; convert to binary string for the library.
|
||||
// eslint-disable-next-line es-x/no-typed-arrays
|
||||
arr = new Uint8Array( fileReader.result );
|
||||
fileStr = '';
|
||||
for ( i = 0; i < arr.byteLength; i++ ) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// This file extends the mw.log skeleton defined in startup/mediawiki.js.
|
||||
// Code that is not needed by mw.loader is placed here.
|
||||
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-console, es-x/no-set */
|
||||
|
||||
/**
|
||||
* @class mw
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-disable es-x/no-string-prototype-includes, es-x/no-array-prototype-includes */
|
||||
|
||||
( function () {
|
||||
'use strict';
|
||||
|
||||
|
|
|
|||
|
|
@ -966,6 +966,7 @@
|
|||
// If only the tokens are invalid, offer to fix them
|
||||
var tokenErrorCount = countValues( false, arguments );
|
||||
if ( tokenErrorCount === errorCount ) {
|
||||
// eslint-disable-next-line es-x/no-regexp-prototype-flags
|
||||
delete actions[ 0 ].flags;
|
||||
actions.push( {
|
||||
action: 'fix',
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
/**
|
||||
* Determine the correct section indicated by the hash.
|
||||
* This function is called onload and onhashchange.
|
||||
*
|
||||
* @param {Function} setSection callback for opening the section
|
||||
*/
|
||||
detectHash: function ( setSection ) {
|
||||
|
|
@ -80,7 +81,7 @@
|
|||
* Trigger onHashChange onload to select the proper tab on startup.
|
||||
*
|
||||
* @param {Function} setSection callback for opening the section
|
||||
* @param {string} defaultSectionName The name of a section to load by default
|
||||
* @param {string} defaultSection The name of a section to load by default
|
||||
*/
|
||||
onLoad: function ( setSection, defaultSection ) {
|
||||
$( window ).on( 'hashchange', this.onHashChange( setSection, defaultSection )
|
||||
|
|
|
|||
|
|
@ -312,6 +312,7 @@
|
|||
// So, this is going to be an ugly conversion.
|
||||
reader.onload = function () {
|
||||
var i,
|
||||
// eslint-disable-next-line es-x/no-typed-arrays
|
||||
buffer = new Uint8Array( reader.result ),
|
||||
string = '';
|
||||
for ( i = 0; i < buffer.byteLength; i++ ) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
try {
|
||||
// Initialize a typed array containing 5 0-initialized 16-bit integers.
|
||||
// Note that Uint16Array is array-like but does not implement Array.
|
||||
// eslint-disable-next-line es-x/no-typed-arrays
|
||||
rnds = new Uint16Array( 5 );
|
||||
// Overwrite the array elements with cryptographically strong random values.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
|
||||
|
|
|
|||
|
|
@ -409,9 +409,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
// eslint-disable-next-line es-x/no-string-prototype-normalize
|
||||
if ( v.normalize ) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
// eslint-disable-next-line es-x/no-string-prototype-normalize
|
||||
v = v.normalize();
|
||||
}
|
||||
re = new RegExp( '^\\s*' + mw.util.escapeRegExp( v ), 'i' );
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
*/
|
||||
/* global $VARS, $CODE, mw */
|
||||
|
||||
/* eslint-disable es-x/no-set, es-x/no-promise-prototype-finally, es-x/no-regexp-prototype-flags */
|
||||
|
||||
( function () {
|
||||
'use strict';
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
* @param {Object} [localEnv.messages]
|
||||
*/
|
||||
QUnit.newMwEnvironment = ( function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
var deepClone = typeof structuredClone === 'function' ? structuredClone : function ( obj ) {
|
||||
return $.extend( /* deep */ true, {}, obj );
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-disable es-x/no-set */
|
||||
|
||||
( function () {
|
||||
QUnit.module( 'mw.loader', QUnit.newMwEnvironment( {
|
||||
beforeEach: function ( assert ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue