Merge "build: Update eslint-config-wikimedia to 0.10.0"

This commit is contained in:
jenkins-bot 2019-01-08 23:54:26 +00:00 committed by Gerrit Code Review
commit c778f763fe
22 changed files with 38 additions and 10 deletions

View file

@ -1,4 +1,5 @@
/* global seleniumUtils, langs */
/* eslint-disable jquery/no-global-selector */
( function () {
'use strict';

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
( function () {
var target,
$specialTab = $( '#ca-nstab-special' ),

View file

@ -41,6 +41,7 @@ ve.init.mw.CollabTarget = function VeInitMwCollabTarget( title, rebaserUrl, conf
ve.ui.commandRegistry.unregister( 'referencesList' );
ve.ui.commandRegistry.unregister( 'citefromid' );
// eslint-disable-next-line jquery/no-global-selector
this.$editableContent = $( '#mw-content-text' );
this.toolbarExportButton = new OO.ui.ButtonWidget( {

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
/**
* MediaWiki mobile article target.
*

View file

@ -24,7 +24,7 @@ ve.init.mw.MobileCollabTarget = function VeInitMwMobileCollabTarget( title, reba
// Initialization
this.$element.addClass( 've-init-mw-mobileArticleTarget ve-init-mw-mobileCollabTarget' );
$( 'body' ).removeClass( 'ns-special' );
$( document.body ).removeClass( 'ns-special' );
};
/* Inheritance */

View file

@ -174,7 +174,7 @@ ve.ui.MWExportWikitextDialog.prototype.export = function () {
}
// Submit the form, mimicking a traditional edit
// Firefox requires the form to be attached
$form.attr( 'action', submitUrl ).appendTo( 'body' ).submit();
$form.attr( 'action', submitUrl ).appendTo( 'body' ).trigger( 'submit' );
};
/* Registration */

View file

@ -86,7 +86,7 @@ ve.ce.MWBlockImageNode.static.renderHtmlAttributes = false;
ve.ce.MWBlockImageNode.static.transition = false;
ve.ce.MWBlockImageNode.static.cssClasses = {
'default': {
default: {
left: 'mw-halign-left',
right: 'mw-halign-right',
center: 'mw-halign-center',

View file

@ -113,7 +113,7 @@ ve.dm.MWTemplateSpecModel.prototype.getDefaultParameterSpec = function ( name )
return {
label: name,
description: null,
'default': '',
default: '',
type: 'string',
aliases: [],
name: name,

View file

@ -9,6 +9,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
/**
* Platform preparation for the MediaWiki view page. This loads (when user needs it) the
* actual MediaWiki integration and VisualEditor library.

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
/**
* MediaWiki desktop article target.
*

View file

@ -67,6 +67,7 @@ mw.libs.ve.SwitchConfirmDialog.prototype.getSetupProcess = function ( data ) {
this.actions.setMode( data.mode );
} else if (
mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl &&
// eslint-disable-next-line jquery/no-global-selector
!$( 'input[name=wpSection]' ).val()
) {
this.actions.setMode( 'restbase' );

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
/* global EasyDeflate */
/**
@ -63,7 +65,11 @@ ve.init.mw.ArticleTarget = function VeInitMwArticleTarget( config ) {
action: 'submit',
veswitched: 1
} );
this.events = { track: $.noop, trackActivationStart: $.noop, trackActivationComplete: $.noop };
this.events = {
track: function () {},
trackActivationStart: function () {},
trackActivationComplete: function () {}
};
this.welcomeDialog = null;
this.welcomeDialogPromise = null;
@ -1754,7 +1760,7 @@ ve.init.mw.ArticleTarget.prototype.submit = function ( wikitext, fields ) {
}
// Submit the form, mimicking a traditional edit
// Firefox requires the form to be attached
$form.attr( 'action', this.submitUrl ).appendTo( 'body' ).submit();
$form.attr( 'action', this.submitUrl ).appendTo( 'body' ).trigger( 'submit' );
return true;
};

View file

@ -253,6 +253,7 @@
if (
// wikitext can be an empty string
options.wikitext !== undefined &&
// eslint-disable-next-line jquery/no-global-selector
!$( '[name=wpSection]' ).val()
) {
if ( conf.fullRestbaseUrl ) {

View file

@ -5,6 +5,8 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/* eslint-disable jquery/no-global-selector */
( function () {
var reviewModeButtonSelect, diffElement, lastDiff,
$wikitextDiffContainer, $wikitextDiffHeader, $wikitextDiffBody,

View file

@ -189,6 +189,6 @@ ve.init.mw.LinkCache.prototype.getRequestPromise = function ( subqueue ) {
pilimit: subqueue.length,
ppprop: 'disambiguation|hiddencat',
titles: subqueue,
'continue': ''
continue: ''
} );
};

View file

@ -8,5 +8,8 @@
},
"globals": {
"sinon": false
},
"rules": {
"jquery/no-parse-html-literal": "off"
}
}

View file

@ -26,7 +26,7 @@ QUnit.test( 'init', function ( assert ) {
tooltip: 'minoredit',
'label-id': 'mw-editpage-minoredit',
'legacy-name': 'minor',
'default': false
default: false
},
wpWatchthis: {
id: 'wpWatchthis',
@ -34,7 +34,7 @@ QUnit.test( 'init', function ( assert ) {
tooltip: 'watch',
'label-id': 'mw-editpage-watch',
'legacy-name': 'watch',
'default': true
default: true
}
},
checkboxesMessages: {

View file

@ -90,6 +90,7 @@
ve.init.target = mwTarget;
mw.libs.ve.setEditorPreference = dummySetEditorPreference;
// Ensure the current target is appended to the current fixture
// eslint-disable-next-line jquery/no-global-selector
$( '#qunit-fixture' ).append( ve.init.target.$element );
}

View file

@ -468,6 +468,8 @@ ve.ui.MWSaveDialog.prototype.showMessage = function ( name, message, options ) {
}
this.$saveMessages.append( $message.css( 'display', 'none' ) );
// FIXME: Use CSS transitions
// eslint-disable-next-line jquery/no-slide
$message.slideDown( {
duration: 250,
progress: this.updateSize.bind( this )

View file

@ -82,6 +82,7 @@ ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage( name, config
$overlay: config.$overlay,
align: 'top',
label: ve.msg( 'visualeditor-dialog-meta-settings-newsectioneditlink-label' ),
// eslint-disable-next-line jquery/no-global-selector
help: ve.msg( 'visualeditor-dialog-meta-settings-newsectioneditlink-help', $( '#ca-edit' ).text() )
}
);

View file

@ -26,6 +26,7 @@ ve.ui.MWWikitextSurface = function VeUiMWWikitextSurface() {
this.$element.addClass( 've-ui-mwWikitextSurface' );
this.getView().$element.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) );
this.$placeholder.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) );
// eslint-disable-next-line jquery/no-global-selector
this.$textbox = $( '#wpTextbox1' );
if ( !this.$textbox.length ) {

View file

@ -10,7 +10,7 @@
"screenshots-all": "grunt screenshots-all"
},
"devDependencies": {
"eslint-config-wikimedia": "0.9.0",
"eslint-config-wikimedia": "0.10.0",
"grunt": "1.0.3",
"grunt-banana-checker": "0.6.0",
"grunt-contrib-copy": "1.0.0",