Merge "build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0"

This commit is contained in:
jenkins-bot 2019-04-04 18:15:33 +00:00 committed by Gerrit Code Review
commit 1df9ad70df
17 changed files with 28 additions and 28 deletions

View file

@ -6,7 +6,7 @@
},
"dependencies": {},
"devDependencies": {
"eslint-config-wikimedia": "0.10.1",
"eslint-config-wikimedia": "0.11.0",
"grunt": "1.0.3",
"grunt-banana-checker": "0.6.0",
"grunt-contrib-watch": "1.1.0",

View file

@ -13,7 +13,7 @@
initialized = false;
function showNotificationOverlay() {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
var $pageCenter = $( '#mw-mf-page-center' ),
overlay = mobile.notifications.overlay( badge.setCount.bind( badge ),
badge.markAsSeen.bind( badge ) );
@ -40,7 +40,7 @@
// be binded on #mw-mf-page-center that close overlay
return false;
},
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
el: $( '#secondary-button.user-button' ).parent()
} );
overlayManager.add( /^\/notifications$/, showNotificationOverlay );
@ -60,7 +60,7 @@
label: mw.msg( 'mobile-frontend-notifications-filter' )
} );
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '.mw-echo-ui-notificationsInboxWidget-cell-placeholder' ).append(
$( '<div>' )
.addClass( 'mw-echo-ui-notificationsInboxWidget-main-toolbar-nav-filter' )
@ -83,9 +83,9 @@
// Load the notification filter overlay
mw.loader.using( 'mobile.notifications.overlay' ).then( function () {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
var $crossWikiUnreadFilter = $( '.mw-echo-ui-crossWikiUnreadFilterWidget' ),
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$notifReadState = $( '.mw-echo-ui-notificationsInboxWidget-main-toolbar-readState' ),
NotificationsFilterOverlay = M.require( 'mobile.notifications.overlay/NotificationsFilterOverlay' );

View file

@ -48,7 +48,7 @@
* @instance
*/
onBackToTopClick: function () {
// eslint-disable-next-line jquery/no-global-selector, jquery/no-animate
// eslint-disable-next-line no-jquery/no-global-selector
$( 'html, body' ).animate( { scrollTop: 0 }, 400 );
}
} );

View file

@ -50,7 +50,7 @@
* @ignore
*/
function initButton() {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '.category-button' ).removeClass( 'hidden' );
}

View file

@ -20,7 +20,7 @@
// the left of the watchstar, we put it after it in the DOM.
$( '<li>' ).addClass( 'page-actions-menu__list-item' )
.append( shareIcon( navigator ).$el )
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
.insertAfter( $( '#ca-watch' ).parent() );
trackShare( 'shownShareButton' );
}

View file

@ -129,7 +129,7 @@
// TODO: T213352 Temporary cache compatibility - to be deleted.
// Any conditionals using this boolean should be DELETED when the
// old page action menu is no longer being served to users.
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
oldPageActionsDOM = $( '#page-actions.hlist' ).length > 0;
if (
isAvailable(

View file

@ -64,7 +64,7 @@
*/
function initButton() {
// This catches language selectors in page actions and in secondary actions (e.g. Main Page)
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
var $primaryBtn = $( '.language-selector' );
if ( $primaryBtn.length ) {
@ -156,7 +156,7 @@
* @ignore
*/
function initModifiedInfo() {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '.modified-enhancement' ).each( function () {
initHistoryLink( $( this ) );
} );
@ -191,7 +191,7 @@
* @ignore
*/
function initRegistrationInfo() {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '#tagline-userpage' ).each( function () {
initRegistrationDate( $( this ) );
} );
@ -211,7 +211,7 @@
// TODO: T213352 Temporary cache compatibility - to be deleted.
// Any conditionals using this boolean should be DELETED when the
// old page action menu is no longer being served to users.
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
oldPageActionsDOM = $( '#page-actions.hlist' ).length > 0;
if ( $downloadAction ) {
@ -355,7 +355,7 @@
disabledClass = disabledEditIcon.getGlyphClassName();
if ( mw.config.get( 'wgMinervaReadOnly' ) ) {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '#ca-edit' )
.removeClass( enabledClass )
.addClass( disabledClass );
@ -366,7 +366,7 @@
// Update anything else that needs enhancing (e.g. watchlist)
initModifiedInfo();
initRegistrationInfo();
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
initHistoryLink( $( '.last-modifier-tagline a' ) );
appendDownloadButton();
initRedlinksCta();

View file

@ -21,7 +21,7 @@
}
$( function () {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
if ( !$( '#mw-mf-page-left' ).find( '.menu' ).length ) {
// Now we have a main menu button register it.
mainMenu.registerClickEvents();

View file

@ -45,7 +45,7 @@
}
}
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( '#mw-mf-display-toggle' ).on( 'click', desktopViewClick );
}( mw.mobileFrontend ) );

View file

@ -40,7 +40,7 @@
function insertPageIssueNotice( labelText, section ) {
var $link = newPageIssueLink( labelText );
$link.attr( 'href', '#/issues/' + section );
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$link.insertAfter( $( 'h1#section_0' ) );
}

View file

@ -135,7 +135,7 @@
// set A-B test class.
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
if ( newTreatmentEnabled ) {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$( 'html' ).addClass( 'issues-group-B' );
}

View file

@ -5,10 +5,10 @@
SearchGateway = mobile.search.SearchGateway,
overlayManager = M.require( 'skins.minerva.scripts/overlayManager' ),
searchLogger = mobile.search.MobileWebSearchLogger,
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$searchInput = $( '#searchInput' ),
placeholder = $searchInput.attr( 'placeholder' ),
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$searchBar = $( '#searchInput, #searchIcon, .skin-minerva-search-trigger' ),
searchRoute = new RegExp( /\/search/ ),
searchOverlayInstance;

View file

@ -3,7 +3,7 @@
Toggler = mobile.Toggler,
TableOfContents = mobile.toc.TableOfContents,
eventBus = mobile.eventBusSingleton,
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$toc = $( '#toc' );
/**

View file

@ -7,7 +7,7 @@
PageGateway = mobile.PageGateway,
api = new mw.Api(),
gateway = new PageGateway( api ),
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$talk = $( '.talk, [rel="discussion"]' ),
// use the plain return value here - T128273
title = $talk.attr( 'data-title' ),

View file

@ -1,7 +1,7 @@
( function ( M ) {
var
page = M.getCurrentPage(),
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$contentContainer = $( '#mw-content-text > .mw-parser-output' ),
mobile = M.require( 'mobile.startup' ),
Toggler = mobile.Toggler,
@ -13,7 +13,7 @@
}
// If there was no mw-parser-output wrapper, just use the parent
if ( $contentContainer.length === 0 ) {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
$contentContainer = $( '#mw-content-text' );
}

View file

@ -10,7 +10,7 @@
* @ignore
*/
function init( page ) {
// eslint-disable-next-line jquery/no-global-selector
// eslint-disable-next-line no-jquery/no-global-selector
var $container = $( '#ca-watch' );
if ( !page.inNamespace( 'special' ) ) {
// eslint-disable-next-line no-new

View file

@ -4,6 +4,6 @@
"../../.eslintrc.json"
],
"rules": {
"jquery/no-parse-html-literal": "off"
"no-jquery/no-parse-html-literal": "off"
}
}