From 75a751f1c649f388ef8daba3c86fe51e8587c659 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 3 Apr 2019 16:32:18 -0700 Subject: [PATCH] build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0 Change-Id: I36a88cbf8b468646c21d47c3b58433895e8ff31a --- package.json | 2 +- resources/skins.minerva.notifications/init.js | 10 +++++----- resources/skins.minerva.options/BackToTopOverlay.js | 2 +- resources/skins.minerva.options/categories.js | 2 +- resources/skins.minerva.options/share.js | 2 +- .../skins.minerva.scripts/downloadPageAction.js | 2 +- resources/skins.minerva.scripts/init.js | 12 ++++++------ resources/skins.minerva.scripts/menu.js | 2 +- resources/skins.minerva.scripts/mobileRedirect.js | 2 +- .../page-issues/page/pageIssueFormatter.js | 2 +- resources/skins.minerva.scripts/pageIssues.js | 2 +- resources/skins.minerva.scripts/search.js | 4 ++-- resources/skins.minerva.scripts/toc.js | 2 +- resources/skins.minerva.talk/init.js | 2 +- resources/skins.minerva.toggling/init.js | 4 ++-- resources/skins.minerva.watchstar/init.js | 2 +- tests/qunit/.eslintrc.json | 2 +- 17 files changed, 28 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 8ba3fb141..aa8eec7bc 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/resources/skins.minerva.notifications/init.js b/resources/skins.minerva.notifications/init.js index 903fed350..bef7f4084 100644 --- a/resources/skins.minerva.notifications/init.js +++ b/resources/skins.minerva.notifications/init.js @@ -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( $( '
' ) .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' ); diff --git a/resources/skins.minerva.options/BackToTopOverlay.js b/resources/skins.minerva.options/BackToTopOverlay.js index f8c6328c1..cc721ffac 100644 --- a/resources/skins.minerva.options/BackToTopOverlay.js +++ b/resources/skins.minerva.options/BackToTopOverlay.js @@ -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 ); } } ); diff --git a/resources/skins.minerva.options/categories.js b/resources/skins.minerva.options/categories.js index 7a19de22a..3f9acd845 100644 --- a/resources/skins.minerva.options/categories.js +++ b/resources/skins.minerva.options/categories.js @@ -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' ); } diff --git a/resources/skins.minerva.options/share.js b/resources/skins.minerva.options/share.js index 5657b0737..15145f746 100644 --- a/resources/skins.minerva.options/share.js +++ b/resources/skins.minerva.options/share.js @@ -20,7 +20,7 @@ // the left of the watchstar, we put it after it in the DOM. $( '
  • ' ).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' ); } diff --git a/resources/skins.minerva.scripts/downloadPageAction.js b/resources/skins.minerva.scripts/downloadPageAction.js index 87e7193b3..dae52510b 100644 --- a/resources/skins.minerva.scripts/downloadPageAction.js +++ b/resources/skins.minerva.scripts/downloadPageAction.js @@ -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( diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index 55e4d1cc6..1d1b885fd 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -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(); diff --git a/resources/skins.minerva.scripts/menu.js b/resources/skins.minerva.scripts/menu.js index af7757365..93de87def 100644 --- a/resources/skins.minerva.scripts/menu.js +++ b/resources/skins.minerva.scripts/menu.js @@ -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(); diff --git a/resources/skins.minerva.scripts/mobileRedirect.js b/resources/skins.minerva.scripts/mobileRedirect.js index 097cca3f4..0be32e1c0 100644 --- a/resources/skins.minerva.scripts/mobileRedirect.js +++ b/resources/skins.minerva.scripts/mobileRedirect.js @@ -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 ) ); diff --git a/resources/skins.minerva.scripts/page-issues/page/pageIssueFormatter.js b/resources/skins.minerva.scripts/page-issues/page/pageIssueFormatter.js index 0173bb513..88d9d2592 100644 --- a/resources/skins.minerva.scripts/page-issues/page/pageIssueFormatter.js +++ b/resources/skins.minerva.scripts/page-issues/page/pageIssueFormatter.js @@ -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' ) ); } diff --git a/resources/skins.minerva.scripts/pageIssues.js b/resources/skins.minerva.scripts/pageIssues.js index 224353e62..0c2c1810a 100644 --- a/resources/skins.minerva.scripts/pageIssues.js +++ b/resources/skins.minerva.scripts/pageIssues.js @@ -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' ); } diff --git a/resources/skins.minerva.scripts/search.js b/resources/skins.minerva.scripts/search.js index f1e203f2c..b0567546c 100644 --- a/resources/skins.minerva.scripts/search.js +++ b/resources/skins.minerva.scripts/search.js @@ -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; diff --git a/resources/skins.minerva.scripts/toc.js b/resources/skins.minerva.scripts/toc.js index 080c46eea..a625a6f93 100644 --- a/resources/skins.minerva.scripts/toc.js +++ b/resources/skins.minerva.scripts/toc.js @@ -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' ); /** diff --git a/resources/skins.minerva.talk/init.js b/resources/skins.minerva.talk/init.js index b82303d1c..90270b8f6 100644 --- a/resources/skins.minerva.talk/init.js +++ b/resources/skins.minerva.talk/init.js @@ -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' ), diff --git a/resources/skins.minerva.toggling/init.js b/resources/skins.minerva.toggling/init.js index cff5bf9d3..4b820f014 100644 --- a/resources/skins.minerva.toggling/init.js +++ b/resources/skins.minerva.toggling/init.js @@ -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' ); } diff --git a/resources/skins.minerva.watchstar/init.js b/resources/skins.minerva.watchstar/init.js index c831fa995..5256dc1a2 100644 --- a/resources/skins.minerva.watchstar/init.js +++ b/resources/skins.minerva.watchstar/init.js @@ -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 diff --git a/tests/qunit/.eslintrc.json b/tests/qunit/.eslintrc.json index 6c0292d2a..14cb24fc9 100644 --- a/tests/qunit/.eslintrc.json +++ b/tests/qunit/.eslintrc.json @@ -4,6 +4,6 @@ "../../.eslintrc.json" ], "rules": { - "jquery/no-parse-html-literal": "off" + "no-jquery/no-parse-html-literal": "off" } }