build: Update eslint-config-wikimedia to 0.16.2

Change-Id: Iea4b73bdceb66e113b7f9c9244ae6b37a3ce205f
This commit is contained in:
Ed Sanders
2020-07-09 16:40:05 +01:00
parent 8822e34708
commit e128c51356
8 changed files with 1813 additions and 667 deletions

View File

@@ -5,9 +5,6 @@
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"globals": {
"OO": false
},
"rules": {
"no-jquery/no-global-selector": "off",
"mediawiki/class-doc": "warn"

View File

@@ -10,8 +10,8 @@ module.exports = function ( grunt ) {
grunt.initConfig( {
eslint: {
options: {
extensions: [ '.js', '.json' ],
cache: true
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'**/*.{js,json}',

2457
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,10 +4,10 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.15.3",
"grunt": "1.1.0",
"eslint-config-wikimedia": "0.16.2",
"grunt": "1.2.1",
"grunt-banana-checker": "0.9.0",
"grunt-eslint": "22.0.0",
"grunt-eslint": "23.0.0",
"grunt-stylelint": "0.15.0",
"grunt-svgmin": "5.0.0",
"stylelint-config-wikimedia": "0.10.1"

View File

@@ -287,6 +287,7 @@
.text( element.textContent );
// This code is to support badges used in Wikimedia
// eslint-disable-next-line mediawiki/class-doc
$languageLink.parent().addClass( element.parentNode.className );
},
onCancel: function () {

View File

@@ -235,7 +235,7 @@
* Loads necessary dependencies, checks input for validity and
* adds the ime menu for elements that should have it.
*
* @param {jquery.Element} $input
* @param {jQuery} $input
* @since 2013.11
*/
mw.ime.handleFocus = function ( $input ) {
@@ -272,7 +272,7 @@
/**
* Just adds ime menu to any input element.
*
* @param {jquery.Element} $input
* @param {jQuery} $input
* @since 2013.11
*/
mw.ime.addIme = function ( $input ) {

View File

@@ -136,6 +136,9 @@
.addClass( 'settings-text' )
.attr( 'data-i18n', module.descriptionI18n );
$settingsLink = $( '<button>' )
// The following classes are used here:
// * display-settings-block
// * input-settings-block
.addClass( moduleName + '-settings-block menu-section' )
.prop( 'id', moduleName + '-panel-trigger' )
.data( 'module', module )

View File

@@ -102,7 +102,7 @@
* Set the preference
*
* @param {string} key
* @param {mixed} value
* @param {Mixed} value
*/
set: function ( key, value ) {
this.preferences[ key ] = value;