Merge "build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0"
This commit is contained in:
commit
1df9ad70df
|
@ -6,7 +6,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-wikimedia": "0.10.1",
|
"eslint-config-wikimedia": "0.11.0",
|
||||||
"grunt": "1.0.3",
|
"grunt": "1.0.3",
|
||||||
"grunt-banana-checker": "0.6.0",
|
"grunt-banana-checker": "0.6.0",
|
||||||
"grunt-contrib-watch": "1.1.0",
|
"grunt-contrib-watch": "1.1.0",
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
initialized = false;
|
initialized = false;
|
||||||
|
|
||||||
function showNotificationOverlay() {
|
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' ),
|
var $pageCenter = $( '#mw-mf-page-center' ),
|
||||||
overlay = mobile.notifications.overlay( badge.setCount.bind( badge ),
|
overlay = mobile.notifications.overlay( badge.setCount.bind( badge ),
|
||||||
badge.markAsSeen.bind( badge ) );
|
badge.markAsSeen.bind( badge ) );
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
// be binded on #mw-mf-page-center that close overlay
|
// be binded on #mw-mf-page-center that close overlay
|
||||||
return false;
|
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()
|
el: $( '#secondary-button.user-button' ).parent()
|
||||||
} );
|
} );
|
||||||
overlayManager.add( /^\/notifications$/, showNotificationOverlay );
|
overlayManager.add( /^\/notifications$/, showNotificationOverlay );
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
label: mw.msg( 'mobile-frontend-notifications-filter' )
|
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(
|
$( '.mw-echo-ui-notificationsInboxWidget-cell-placeholder' ).append(
|
||||||
$( '<div>' )
|
$( '<div>' )
|
||||||
.addClass( 'mw-echo-ui-notificationsInboxWidget-main-toolbar-nav-filter' )
|
.addClass( 'mw-echo-ui-notificationsInboxWidget-main-toolbar-nav-filter' )
|
||||||
|
@ -83,9 +83,9 @@
|
||||||
|
|
||||||
// Load the notification filter overlay
|
// Load the notification filter overlay
|
||||||
mw.loader.using( 'mobile.notifications.overlay' ).then( function () {
|
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' ),
|
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' ),
|
$notifReadState = $( '.mw-echo-ui-notificationsInboxWidget-main-toolbar-readState' ),
|
||||||
NotificationsFilterOverlay = M.require( 'mobile.notifications.overlay/NotificationsFilterOverlay' );
|
NotificationsFilterOverlay = M.require( 'mobile.notifications.overlay/NotificationsFilterOverlay' );
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
* @instance
|
* @instance
|
||||||
*/
|
*/
|
||||||
onBackToTopClick: function () {
|
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 );
|
$( 'html, body' ).animate( { scrollTop: 0 }, 400 );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
function initButton() {
|
function initButton() {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$( '.category-button' ).removeClass( 'hidden' );
|
$( '.category-button' ).removeClass( 'hidden' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
// the left of the watchstar, we put it after it in the DOM.
|
// the left of the watchstar, we put it after it in the DOM.
|
||||||
$( '<li>' ).addClass( 'page-actions-menu__list-item' )
|
$( '<li>' ).addClass( 'page-actions-menu__list-item' )
|
||||||
.append( shareIcon( navigator ).$el )
|
.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() );
|
.insertAfter( $( '#ca-watch' ).parent() );
|
||||||
trackShare( 'shownShareButton' );
|
trackShare( 'shownShareButton' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
// TODO: T213352 Temporary cache compatibility - to be deleted.
|
// TODO: T213352 Temporary cache compatibility - to be deleted.
|
||||||
// Any conditionals using this boolean should be DELETED when the
|
// Any conditionals using this boolean should be DELETED when the
|
||||||
// old page action menu is no longer being served to users.
|
// 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;
|
oldPageActionsDOM = $( '#page-actions.hlist' ).length > 0;
|
||||||
if (
|
if (
|
||||||
isAvailable(
|
isAvailable(
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
*/
|
*/
|
||||||
function initButton() {
|
function initButton() {
|
||||||
// This catches language selectors in page actions and in secondary actions (e.g. Main Page)
|
// 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' );
|
var $primaryBtn = $( '.language-selector' );
|
||||||
|
|
||||||
if ( $primaryBtn.length ) {
|
if ( $primaryBtn.length ) {
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
function initModifiedInfo() {
|
function initModifiedInfo() {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$( '.modified-enhancement' ).each( function () {
|
$( '.modified-enhancement' ).each( function () {
|
||||||
initHistoryLink( $( this ) );
|
initHistoryLink( $( this ) );
|
||||||
} );
|
} );
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
function initRegistrationInfo() {
|
function initRegistrationInfo() {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$( '#tagline-userpage' ).each( function () {
|
$( '#tagline-userpage' ).each( function () {
|
||||||
initRegistrationDate( $( this ) );
|
initRegistrationDate( $( this ) );
|
||||||
} );
|
} );
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
// TODO: T213352 Temporary cache compatibility - to be deleted.
|
// TODO: T213352 Temporary cache compatibility - to be deleted.
|
||||||
// Any conditionals using this boolean should be DELETED when the
|
// Any conditionals using this boolean should be DELETED when the
|
||||||
// old page action menu is no longer being served to users.
|
// 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;
|
oldPageActionsDOM = $( '#page-actions.hlist' ).length > 0;
|
||||||
|
|
||||||
if ( $downloadAction ) {
|
if ( $downloadAction ) {
|
||||||
|
@ -355,7 +355,7 @@
|
||||||
disabledClass = disabledEditIcon.getGlyphClassName();
|
disabledClass = disabledEditIcon.getGlyphClassName();
|
||||||
|
|
||||||
if ( mw.config.get( 'wgMinervaReadOnly' ) ) {
|
if ( mw.config.get( 'wgMinervaReadOnly' ) ) {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$( '#ca-edit' )
|
$( '#ca-edit' )
|
||||||
.removeClass( enabledClass )
|
.removeClass( enabledClass )
|
||||||
.addClass( disabledClass );
|
.addClass( disabledClass );
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
// Update anything else that needs enhancing (e.g. watchlist)
|
// Update anything else that needs enhancing (e.g. watchlist)
|
||||||
initModifiedInfo();
|
initModifiedInfo();
|
||||||
initRegistrationInfo();
|
initRegistrationInfo();
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
||||||
appendDownloadButton();
|
appendDownloadButton();
|
||||||
initRedlinksCta();
|
initRedlinksCta();
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$( function () {
|
$( 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 ) {
|
if ( !$( '#mw-mf-page-left' ).find( '.menu' ).length ) {
|
||||||
// Now we have a main menu button register it.
|
// Now we have a main menu button register it.
|
||||||
mainMenu.registerClickEvents();
|
mainMenu.registerClickEvents();
|
||||||
|
|
|
@ -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-mf-display-toggle' ).on( 'click', desktopViewClick );
|
||||||
|
|
||||||
}( mw.mobileFrontend ) );
|
}( mw.mobileFrontend ) );
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
function insertPageIssueNotice( labelText, section ) {
|
function insertPageIssueNotice( labelText, section ) {
|
||||||
var $link = newPageIssueLink( labelText );
|
var $link = newPageIssueLink( labelText );
|
||||||
$link.attr( 'href', '#/issues/' + section );
|
$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' ) );
|
$link.insertAfter( $( 'h1#section_0' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
// set A-B test class.
|
// set A-B test class.
|
||||||
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
|
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
|
||||||
if ( newTreatmentEnabled ) {
|
if ( newTreatmentEnabled ) {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$( 'html' ).addClass( 'issues-group-B' );
|
$( 'html' ).addClass( 'issues-group-B' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
SearchGateway = mobile.search.SearchGateway,
|
SearchGateway = mobile.search.SearchGateway,
|
||||||
overlayManager = M.require( 'skins.minerva.scripts/overlayManager' ),
|
overlayManager = M.require( 'skins.minerva.scripts/overlayManager' ),
|
||||||
searchLogger = mobile.search.MobileWebSearchLogger,
|
searchLogger = mobile.search.MobileWebSearchLogger,
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$searchInput = $( '#searchInput' ),
|
$searchInput = $( '#searchInput' ),
|
||||||
placeholder = $searchInput.attr( 'placeholder' ),
|
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' ),
|
$searchBar = $( '#searchInput, #searchIcon, .skin-minerva-search-trigger' ),
|
||||||
searchRoute = new RegExp( /\/search/ ),
|
searchRoute = new RegExp( /\/search/ ),
|
||||||
searchOverlayInstance;
|
searchOverlayInstance;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Toggler = mobile.Toggler,
|
Toggler = mobile.Toggler,
|
||||||
TableOfContents = mobile.toc.TableOfContents,
|
TableOfContents = mobile.toc.TableOfContents,
|
||||||
eventBus = mobile.eventBusSingleton,
|
eventBus = mobile.eventBusSingleton,
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
$toc = $( '#toc' );
|
$toc = $( '#toc' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
PageGateway = mobile.PageGateway,
|
PageGateway = mobile.PageGateway,
|
||||||
api = new mw.Api(),
|
api = new mw.Api(),
|
||||||
gateway = new PageGateway( 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"]' ),
|
$talk = $( '.talk, [rel="discussion"]' ),
|
||||||
// use the plain return value here - T128273
|
// use the plain return value here - T128273
|
||||||
title = $talk.attr( 'data-title' ),
|
title = $talk.attr( 'data-title' ),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
( function ( M ) {
|
( function ( M ) {
|
||||||
var
|
var
|
||||||
page = M.getCurrentPage(),
|
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' ),
|
$contentContainer = $( '#mw-content-text > .mw-parser-output' ),
|
||||||
mobile = M.require( 'mobile.startup' ),
|
mobile = M.require( 'mobile.startup' ),
|
||||||
Toggler = mobile.Toggler,
|
Toggler = mobile.Toggler,
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
}
|
}
|
||||||
// If there was no mw-parser-output wrapper, just use the parent
|
// If there was no mw-parser-output wrapper, just use the parent
|
||||||
if ( $contentContainer.length === 0 ) {
|
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' );
|
$contentContainer = $( '#mw-content-text' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
function init( page ) {
|
function init( page ) {
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
var $container = $( '#ca-watch' );
|
var $container = $( '#ca-watch' );
|
||||||
if ( !page.inNamespace( 'special' ) ) {
|
if ( !page.inNamespace( 'special' ) ) {
|
||||||
// eslint-disable-next-line no-new
|
// eslint-disable-next-line no-new
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
"../../.eslintrc.json"
|
"../../.eslintrc.json"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"jquery/no-parse-html-literal": "off"
|
"no-jquery/no-parse-html-literal": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue