From 23b6332a5b7dc8650a52215f447f2ef49b630697 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 18 Sep 2020 20:15:57 +0200 Subject: [PATCH] Avoid shadowed variables in javascript The rule no-shadow gets enabled in the version eslint-config-wikimedia 0.17.0. In prepration for the automatic update with libup this needs to be done in a separate patch set due to T262450 Change-Id: I66d405aef6d2b777e9a7f63734f2b5a5649d2080 --- package.json | 2 +- resources/dist/index.js | Bin 42867 -> 42867 bytes resources/dist/index.js.map.json | Bin 205967 -> 206280 bytes src/actions.js | 4 ++-- src/changeListeners/eventLogging.js | 6 +++--- src/changeListeners/settings.js | 16 ++++++++-------- src/changeListeners/statsv.js | 6 +++--- src/index.js | 16 ++++++++-------- src/ui/renderer.js | 14 +++++++------- tests/node-qunit/isEnabled.test.js | 6 +++--- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 03813db6f..fb6e7e472 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "bundlesize": [ { "path": "resources/dist/index.js", - "maxSize": "13.64kB" + "maxSize": "13.7kB" } ] } diff --git a/resources/dist/index.js b/resources/dist/index.js index fc879241b9dd21e871a54f7dbce7fa1f488cc259..d0974d5b1b4418508e2164e507d5db26ddb1cf71 100644 GIT binary patch delta 116 zcmex-j_LC`rVWYlj8Th|;vE$-b@Fu*b&_?8bxJj>{WVf`GE?=^^7Bhli+nQkvNeh( zH!V;V&DYe_fyxz^B$gDHX_V+BPTsS?kTG-ey9JU`$w19;6$Odusb!g|<;6fn#hVou H2C)GE!`msl delta 116 zcmex-j_LC`rVWYljG2p*;vE%=bTW1FbrN-wb&55s{WVf`GE?=^^7Bhli+nQkvNcL3 zH!V;V&D7M?fyxz^B$gDHX_V;XPu{b@kg;g;y9JU`i9pS86$Odusb!g|<;6fn$(t1y H2C)GE%Qz{< diff --git a/resources/dist/index.js.map.json b/resources/dist/index.js.map.json index 9824c6f504f957af5c6827f5509713a728c9b6a8..cfcbe81118122759f3bdb1d81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6lioUzH_L!s1irZG`J2(n(O$f z4H`L6+*i4NB+gE0H@OYYAioMJ{P6~ayN({8TBlKWL;e)DPsF`yk-%o85@P}ByhUx9 zn`fy3PuOMJc3GWN30!wP1qe?Fjt1+H$m7;@0+&Bp3bzE|3M$M>@~|qt7Pc9Kj44pb zuqgnrCrzQsxZDNK1YL!RTV|u3M`4QuhdPVCgbkK5vZ{Fwc_jwxI{KFnM|yA!&#f(S zn{J=76@0qOmx|3<=;X4=I4Gs)9-#1WQu*v(-aAC20pS~y=yR8`DEjnSVLh447y!Vak!JfZy{s8Nsg;s7^nk?0~Tw2@#q z+mRLCtAH|KfKMR^+xE)b;%LCeHyW@HY*1O~2)P&Ty|ll+)XU zORx!qH$DE*HH-08BU8<%`Fh}Z*r*W@pEGAM`8L}lQ|Hv4Y9?8bU2}$a!@VBda_iVV z?~0KG=mzB;NdouiORiO!>GG@hK7spj*f4H3xucojTJC5#1Ru!_Yo0ClH(o8?f|Fzl zmS{-_zyHwCK&)CC-C~Y#-y{cgCnsm-mDpiB!{=$^*s&Hzbu(QzA$%V>_C7KwF3ZM6 zFfrFfM3P@eFcWT>Bsf=FQ9RLG@+#Vn34iQ$%8RC&vh~&s3zgW|!Z;KbdBp__fLn#ceAR}+sML|*S(J$(B0zAsE1#?Sly z`*#-(zc=su)ro`07JPRe#20-2gYJTF_u#)T_@)o8I=*)u ze8KU(?eK|3pXWPx_mc0*!OKg&%jX}<7dn+j-GABqW#Hl8FZn`u9Q@7AH@)uQ;Z5I5 z2f;1hy@xjyeJ}m)!T0{mck|(&{!iZbrFK-5>exn82HV_+P$5{CxU<`*vPu)@UDm{a?V^i&6ZO`?1fN$RB>@$G*FR{}&u} BZGHd% diff --git a/src/actions.js b/src/actions.js index 02c41ec48..0326fa119 100644 --- a/src/actions.js +++ b/src/actions.js @@ -149,12 +149,12 @@ export function fetch( gateway, title, el, token, type ) { } ) .catch( ( err, data ) => { const exception = new Error( err ); - const type = data && data.textStatus && data.textStatus === 'abort' ? + const fetchType = data && data.textStatus && data.textStatus === 'abort' ? types.FETCH_ABORTED : types.FETCH_FAILED; exception.data = data; dispatch( { - type, + type: fetchType, el, token } ); diff --git a/src/changeListeners/eventLogging.js b/src/changeListeners/eventLogging.js index 7f08ea2ec..1e63f2e9f 100644 --- a/src/changeListeners/eventLogging.js +++ b/src/changeListeners/eventLogging.js @@ -19,8 +19,8 @@ export default function eventLogging( boundActions, eventLoggingTracker, getCurrentTimestamp ) { return ( _, state ) => { - const eventLogging = state.eventLogging; - let event = eventLogging.event; + const eventLoggingObj = state.eventLogging; + let event = eventLoggingObj.event; if ( !event ) { return; @@ -33,7 +33,7 @@ export default function eventLogging( // Rightly or wrongly, it's left as an exercise for the analyst to // calculate the time at which the interaction started as part of their // analyses, e.g. https://phabricator.wikimedia.org/T186016#4002923. - event = $.extend( true, {}, eventLogging.baseData, event, { + event = $.extend( true, {}, eventLoggingObj.baseData, event, { timestamp: getCurrentTimestamp() } ); diff --git a/src/changeListeners/settings.js b/src/changeListeners/settings.js index 8d4866583..cab4ff042 100644 --- a/src/changeListeners/settings.js +++ b/src/changeListeners/settings.js @@ -6,7 +6,7 @@ * @return {ext.popups.ChangeListener} */ export default function settings( boundActions, render ) { - let settings; + let settingsObj; return ( prevState, state ) => { if ( !prevState ) { @@ -20,25 +20,25 @@ export default function settings( boundActions, render ) { state.settings.shouldShow === true ) { // Lazily instantiate the settings UI - if ( !settings ) { - settings = render( boundActions ); - settings.appendTo( document.body ); + if ( !settingsObj ) { + settingsObj = render( boundActions ); + settingsObj.appendTo( document.body ); } // Update the UI settings with the current settings - settings.setEnabled( state.preview.enabled ); + settingsObj.setEnabled( state.preview.enabled ); - settings.show(); + settingsObj.show(); } else if ( prevState.settings.shouldShow === true && state.settings.shouldShow === false ) { - settings.hide(); + settingsObj.hide(); } // Update help visibility if ( prevState.settings.showHelp !== state.settings.showHelp ) { - settings.toggleHelp( state.settings.showHelp ); + settingsObj.toggleHelp( state.settings.showHelp ); } }; } diff --git a/src/changeListeners/statsv.js b/src/changeListeners/statsv.js index 902f17d5b..409ec89dd 100644 --- a/src/changeListeners/statsv.js +++ b/src/changeListeners/statsv.js @@ -12,10 +12,10 @@ */ export default function statsv( boundActions, track ) { return ( _, state ) => { - const statsv = state.statsv; + const statsvObj = state.statsv; - if ( statsv.action ) { - track( statsv.action, statsv.data ); + if ( statsvObj.action ) { + track( statsvObj.action, statsvObj.data ); boundActions.statsvLogged(); } diff --git a/src/index.js b/src/index.js index ef42ddfea..4a40a90cd 100644 --- a/src/index.js +++ b/src/index.js @@ -115,36 +115,36 @@ function getCurrentTimestamp() { * [store](http://redux.js.org/docs/api/Store.html#store). * * @param {Redux.Store} store - * @param {Object} actions + * @param {Object} registerActions * @param {UserSettings} userSettings * @param {Function} settingsDialog * @param {PreviewBehavior} previewBehavior * @param {EventTracker} statsvTracker * @param {EventTracker} eventLoggingTracker * @param {EventTracker} pageviewTracker - * @param {Function} getCurrentTimestamp + * @param {Function} callbackCurrentTimestamp * @return {void} */ function registerChangeListeners( - store, actions, userSettings, settingsDialog, previewBehavior, - statsvTracker, eventLoggingTracker, pageviewTracker, getCurrentTimestamp + store, registerActions, userSettings, settingsDialog, previewBehavior, + statsvTracker, eventLoggingTracker, pageviewTracker, callbackCurrentTimestamp ) { registerChangeListener( store, changeListeners.footerLink( actions ) ); registerChangeListener( store, changeListeners.linkTitle() ); registerChangeListener( store, changeListeners.render( previewBehavior ) ); registerChangeListener( - store, changeListeners.statsv( actions, statsvTracker ) ); + store, changeListeners.statsv( registerActions, statsvTracker ) ); registerChangeListener( store, changeListeners.syncUserSettings( userSettings ) ); registerChangeListener( - store, changeListeners.settings( actions, settingsDialog ) ); + store, changeListeners.settings( registerActions, settingsDialog ) ); registerChangeListener( store, changeListeners.eventLogging( - actions, eventLoggingTracker, getCurrentTimestamp + registerActions, eventLoggingTracker, callbackCurrentTimestamp ) ); registerChangeListener( store, - changeListeners.pageviews( actions, pageviewTracker ) + changeListeners.pageviews( registerActions, pageviewTracker ) ); } diff --git a/src/ui/renderer.js b/src/ui/renderer.js index 342125c2e..7485084c7 100644 --- a/src/ui/renderer.js +++ b/src/ui/renderer.js @@ -360,12 +360,12 @@ export function hide( preview ) { * @param {number} windowData.scrollTop * @param {number} windowData.width * @param {number} windowData.height - * @param {number} pointerSize Space reserved for the pointer + * @param {number} pointerSpaceSize Space reserved for the pointer * @param {string} dir 'ltr' if left-to-right, 'rtl' if right-to-left. * @return {ext.popups.PreviewLayout} */ export function createLayout( - isPreviewTall, eventData, linkData, windowData, pointerSize, dir + isPreviewTall, eventData, linkData, windowData, pointerSpaceSize, dir ) { let flippedX = false, flippedY = false, @@ -377,7 +377,7 @@ export function createLayout( eventData.pageY - windowData.scrollTop, linkData.clientRects, false - ) + windowData.scrollTop + pointerSize : + ) + windowData.scrollTop + pointerSpaceSize : // Position according to link position or size linkData.offset.top + linkData.height + pointerSize, offsetLeft; @@ -430,7 +430,7 @@ export function createLayout( ) + windowData.scrollTop; } - offsetTop -= pointerSize; + offsetTop -= pointerSpaceSize; } return { @@ -498,11 +498,11 @@ export function getClasses( preview, layout ) { * @param {ext.popups.PreviewLayout} layout * @param {string[]} classes class names used for layout out the preview * @param {number} predefinedLandscapeImageHeight landscape image height - * @param {number} pointerSize + * @param {number} pointerSpaceSize * @return {void} */ export function layoutPreview( - preview, layout, classes, predefinedLandscapeImageHeight, pointerSize + preview, layout, classes, predefinedLandscapeImageHeight, pointerSpaceSize ) { const popup = preview.el, isTall = preview.isTall, @@ -517,7 +517,7 @@ export function layoutPreview( ) { popup.find( '.mwe-popups-extract' ).css( 'margin-top', - thumbnail.height - pointerSize + thumbnail.height - pointerSpaceSize ); } diff --git a/tests/node-qunit/isEnabled.test.js b/tests/node-qunit/isEnabled.test.js index 5def27bea..1fb9ed0c5 100644 --- a/tests/node-qunit/isEnabled.test.js +++ b/tests/node-qunit/isEnabled.test.js @@ -1,13 +1,13 @@ import * as stubs from './stubs'; import isEnabled from '../../src/isEnabled'; -function createStubUserSettings( isEnabled ) { +function createStubUserSettings( expectEnabled ) { return { hasIsEnabled() { - return isEnabled !== undefined; + return expectEnabled !== undefined; }, getIsEnabled() { - return Boolean( isEnabled ); + return Boolean( expectEnabled ); } }; }