ESLint: Manually enforce prefer-const
Change-Id: Id35fb62915e8067deaa1eb412ab3cb9d9353b9e8
This commit is contained in:
parent
c125751148
commit
c1d97fe834
4 changed files with 10 additions and 13 deletions
|
@ -4,8 +4,5 @@
|
|||
"wikimedia/client",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki"
|
||||
],
|
||||
"rules": {
|
||||
"prefer-const": "warn"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* eslint-disable no-jquery/no-global-selector */
|
||||
module.exports = function () {
|
||||
let mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
echoHacked = false,
|
||||
const mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
notifications = $( '#pt-notifications-alert a' ).data( 'counter-num' ) + $( '#pt-notifications-notice a' ).data( 'counter-num' );
|
||||
let echoHacked = false,
|
||||
echoHackActive = false,
|
||||
notifications = $( '#pt-notifications-alert a' ).data( 'counter-num' ) + $( '#pt-notifications-notice a' ).data( 'counter-num' ),
|
||||
notificationsString;
|
||||
|
||||
// When the icons are clicked for the first time, they are replaced with a JS interface,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* eslint-disable no-jquery/no-global-selector */
|
||||
module.exports = function () {
|
||||
mw.loader.using( [ 'ext.uls.interface' ] ).then( () => {
|
||||
let mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
$ULSTrigger = $( '#pt-uls' ),
|
||||
ULSMoved = false;
|
||||
const mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
$ULSTrigger = $( '#pt-uls' );
|
||||
let ULSMoved = false;
|
||||
|
||||
function moveULS() {
|
||||
if ( $ULSTrigger.length ) {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
/* eslint-disable no-jquery/no-global-selector */
|
||||
$( () => {
|
||||
let mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
const mobileMediaQuery = window.matchMedia( 'screen and (max-width: 550px)' ),
|
||||
isResponsive = document.body.classList.contains( 'skin--responsive' ),
|
||||
echo = require( './mobile-echo.js' ),
|
||||
uls = require( './mobile-uls.js' ),
|
||||
// Track if DOM has been set up for mobile fanciness yet
|
||||
monobookMobileElements = false,
|
||||
// Toggles and targets for popouts
|
||||
toggles = {
|
||||
'#sidebar-toggle': '#sidebar-mobilejs',
|
||||
|
@ -14,6 +12,8 @@ $( () => {
|
|||
'#ca-languages a': '#p-lang',
|
||||
'#ca-tools a': '#p-tb'
|
||||
};
|
||||
// Track if DOM has been set up for mobile fanciness yet
|
||||
let monobookMobileElements = false;
|
||||
|
||||
// Close menus
|
||||
function closeMenus() {
|
||||
|
|
Loading…
Reference in a new issue