build: Update linters to latest and make pass
eslint-config-wikimedia 0.7.2 → 0.11.0 eslint-plugin-qunit 3.3.1 → 4.0.0 grunt-banana-checker 0.6.0 → 0.7.0 Change-Id: I6fe621711ecfbd54ed69ea1bc9f03d57eebd934c
这个提交包含在:
父节点
ec773d7cbd
当前提交
732dae1283
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": "wikimedia",
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"extends": [
|
||||
"wikimedia/client",
|
||||
"wikimedia/jquery"
|
||||
],
|
||||
"globals": {
|
||||
"mw": false,
|
||||
"$": false,
|
||||
"OO": false
|
||||
},
|
||||
"rules": {
|
||||
|
|
|
@ -2,6 +2,7 @@ composer.lock
|
|||
/nbproject/private/
|
||||
/node_modules
|
||||
/vendor
|
||||
.eslintcache
|
||||
|
||||
# Editors
|
||||
*.kate-swp
|
||||
|
|
|
@ -25,6 +25,10 @@ module.exports = function ( grunt ) {
|
|||
]
|
||||
},
|
||||
eslint: {
|
||||
options: {
|
||||
reportUnusedDisableDirectives: true,
|
||||
cache: true
|
||||
},
|
||||
all: '.'
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
( function () {
|
||||
'use strict';
|
||||
/* eslint-disable no-alert, no-jquery/no-global-selector */
|
||||
$( function () {
|
||||
// Confirm renames
|
||||
$( '#mw-renamequeue-approve' ).click( function () {
|
||||
$( '#mw-renamequeue-approve' ).on( 'click', function () {
|
||||
// TODO: Convert this to OOUI.
|
||||
// eslint-disable-next-line no-alert
|
||||
return confirm( mw.msg( 'centralauth-rename-confirm' ) );
|
||||
} );
|
||||
$( '#mw-renamequeue-deny' ).click( function () {
|
||||
$( '#mw-renamequeue-deny' ).on( 'click', function () {
|
||||
// TODO: Convert this to OOUI.
|
||||
// eslint-disable-next-line no-alert
|
||||
return confirm( mw.msg( 'centralauth-rename-deny' ) );
|
||||
} );
|
||||
} );
|
||||
/* eslint-enable no-alert, no-jquery/no-global-selector */
|
||||
}() );
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
};
|
||||
|
||||
$( function () {
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '.mw-autocomplete-global-user' ).suggestions( config );
|
||||
} );
|
||||
}() );
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
$methodHint = $( '<div>' )
|
||||
.addClass( 'merge-method-help-div' )
|
||||
.hide()
|
||||
.click( function () {
|
||||
.on( 'click', function () {
|
||||
// eslint-disable-next-line no-jquery/no-fade
|
||||
$( this ).fadeOut();
|
||||
} );
|
||||
mw.util.$content.append( $methodHint );
|
||||
|
@ -25,12 +26,13 @@
|
|||
// centralauth-merge-method-login-desc
|
||||
hintHtml = mw.html.element(
|
||||
'p', {
|
||||
'class': 'merge-method-help-name'
|
||||
class: 'merge-method-help-name'
|
||||
},
|
||||
mw.msg( 'centralauth-merge-method-' + methodName )
|
||||
) +
|
||||
mw.message( 'centralauth-merge-method-' + methodName + '-desc' ).escaped();
|
||||
|
||||
// eslint-disable-next-line no-jquery/no-fade
|
||||
$methodHint
|
||||
.html( hintHtml )
|
||||
.css( {
|
||||
|
@ -42,22 +44,25 @@
|
|||
|
||||
$( function () {
|
||||
// Back link for CentralLogin/start
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '#centralauth-backlink-section' ).append(
|
||||
$( '<a>' )
|
||||
.attr( 'href', '#' )
|
||||
.text( mw.msg( 'centralauth-completelogin-back' ) )
|
||||
.click( function ( e ) {
|
||||
.on( 'click', function ( e ) {
|
||||
e.preventDefault();
|
||||
parent.history.back();
|
||||
} )
|
||||
);
|
||||
|
||||
// OnClick event listener for the "(?)" tooltips on Special:CentralAuth
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '.mw-centralauth-wikislist' ).on( 'click', '.merge-method-help', function ( event ) {
|
||||
showMethodHint( $( this ).data( 'centralauth-mergemethod' ), event );
|
||||
} );
|
||||
|
||||
// Confirm account deletions
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '#mw-centralauth-delete input[type="submit"]' ).on( 'click', function () {
|
||||
// TODO: Convert this to OOUI.
|
||||
// eslint-disable-next-line no-alert
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
*/
|
||||
function GlobalUserInputWidget( config ) {
|
||||
// Config initialization
|
||||
config = config || {};
|
||||
config = $.extend( {}, config, { autocomplete: false } );
|
||||
|
||||
// Parent constructor
|
||||
GlobalUserInputWidget.parent.call( this, $.extend( {}, config, { autocomplete: false } ) );
|
||||
GlobalUserInputWidget.parent.call( this, config );
|
||||
|
||||
// Mixin constructors
|
||||
OO.ui.mixin.LookupElement.call( this, config );
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
$.getJSON( login.toString() )
|
||||
.then( function ( data ) {
|
||||
if ( data.toolslist ) {
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '#p-personal ul' ).html( data.toolslist );
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '#p-personal' ).addClass( 'centralAuthPPersonalAnimation' );
|
||||
mw.hook( 'centralauth-p-personal-reset' ).fire();
|
||||
} else if ( data.notify ) {
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.7.2",
|
||||
"eslint-plugin-qunit": "3.3.1",
|
||||
"eslint-config-wikimedia": "0.11.0",
|
||||
"eslint-plugin-qunit": "4.0.0",
|
||||
"grunt": "1.0.3",
|
||||
"grunt-banana-checker": "0.6.0",
|
||||
"grunt-banana-checker": "0.7.0",
|
||||
"grunt-eslint": "21.0.0",
|
||||
"grunt-jsonlint": "1.1.0",
|
||||
"grunt-stylelint": "0.10.1",
|
||||
|
|
正在加载...
在新工单中引用