diff --git a/client/desktop/window-handlers/failed-to-load/index.js b/client/desktop/window-handlers/failed-to-load/index.js index cbaf37f0dfcdc..2a1fc224e384b 100644 --- a/client/desktop/window-handlers/failed-to-load/index.js +++ b/client/desktop/window-handlers/failed-to-load/index.js @@ -71,25 +71,24 @@ function failedToLoadError( mainWindow ) { // @adlk: Keep in mind that every request, even the ones we do not control (e.g. atomic- or self hosted sites), might cause the app to "soft-crash" even though the user experience might not be affected directly by some requests that fail. module.exports = function ( mainWindow ) { // This attempts to catch some network errors and display an error screen in order to avoid a blank white page - mainWindow.webContents.on( 'did-fail-load', async function ( - event, - errorCode, - errorDescription - ) { - if ( ERRORS_TO_IGNORE.indexOf( errorCode ) === -1 ) { - if ( isErrorPage( event.sender ) ) { - failedToLoadError( mainWindow ); - } else { - log.error( - 'Failed to load from server, showing fallback page: code=' + - errorCode + - ' ' + - errorDescription - ); + mainWindow.webContents.on( + 'did-fail-load', + async function ( event, errorCode, errorDescription ) { + if ( ERRORS_TO_IGNORE.indexOf( errorCode ) === -1 ) { + if ( isErrorPage( event.sender ) ) { + failedToLoadError( mainWindow ); + } else { + log.error( + 'Failed to load from server, showing fallback page: code=' + + errorCode + + ' ' + + errorDescription + ); - await mainWindow.webContents.session.setProxy( { proxyRules: 'direct://' } ); - mainWindow.loadURL( FAILED_FILE + '#' + errorCode ); + await mainWindow.webContents.session.setProxy( { proxyRules: 'direct://' } ); + mainWindow.loadURL( FAILED_FILE + '#' + errorCode ); + } } } - } ); + ); }; diff --git a/client/lib/cart/store/cart-synchronizer.js b/client/lib/cart/store/cart-synchronizer.js index 4648f8956bb07..5cda186347bb9 100644 --- a/client/lib/cart/store/cart-synchronizer.js +++ b/client/lib/cart/store/cart-synchronizer.js @@ -142,17 +142,18 @@ CartSynchronizer.prototype._processQueuedChanges = function () { }; CartSynchronizer.prototype._postToServer = function ( callback ) { - this._wpcom.setCart( this._cartKey, preprocessCartForServer( this._latestValue ), function ( - error, - newValue - ) { - if ( error ) { - callback( error ); - return; - } + this._wpcom.setCart( + this._cartKey, + preprocessCartForServer( this._latestValue ), + function ( error, newValue ) { + if ( error ) { + callback( error ); + return; + } - callback( null, preprocessCartFromServer( newValue ) ); - } ); + callback( null, preprocessCartFromServer( newValue ) ); + } + ); }; CartSynchronizer.prototype._poll = function () { diff --git a/client/lib/post-normalizer/rule-create-better-excerpt.js b/client/lib/post-normalizer/rule-create-better-excerpt.js index 258ee2402660c..97171fee4d5fa 100644 --- a/client/lib/post-normalizer/rule-create-better-excerpt.js +++ b/client/lib/post-normalizer/rule-create-better-excerpt.js @@ -77,14 +77,14 @@ export function formatExcerpt( content ) { stripLeadingBreaklines( dom ); // now limit it to the first three elements - forEach( dom.querySelectorAll( '#__better_excerpt__ > p, #__better_excerpt__ > br' ), function ( - element, - index - ) { - if ( index >= 3 ) { - element.parentNode && element.parentNode.removeChild( element ); + forEach( + dom.querySelectorAll( '#__better_excerpt__ > p, #__better_excerpt__ > br' ), + function ( element, index ) { + if ( index >= 3 ) { + element.parentNode && element.parentNode.removeChild( element ); + } } - } ); + ); // trim and replace   entities const betterExcerpt = trim( dom.innerHTML.replace( / /g, ' ' ) ); diff --git a/client/lib/wpcom-undocumented/lib/undocumented.js b/client/lib/wpcom-undocumented/lib/undocumented.js index 1c8f3f3110b88..14d67e02a0697 100644 --- a/client/lib/wpcom-undocumented/lib/undocumented.js +++ b/client/lib/wpcom-undocumented/lib/undocumented.js @@ -2410,17 +2410,17 @@ Undocumented.prototype.updateSiteAddress = function ( }; Undocumented.prototype.requestGdprConsentManagementLink = function ( domain, callback ) { - return this.wpcom.req.get( `/domains/${ domain }/request-gdpr-consent-management-link`, function ( - error, - response - ) { - if ( error ) { - callback( error ); - return; - } + return this.wpcom.req.get( + `/domains/${ domain }/request-gdpr-consent-management-link`, + function ( error, response ) { + if ( error ) { + callback( error ); + return; + } - callback( null, response ); - } ); + callback( null, response ); + } + ); }; Undocumented.prototype.getDomainConnectSyncUxUrl = function ( diff --git a/client/my-sites/purchases/site-level-purchases-error-boundary.tsx b/client/my-sites/purchases/site-level-purchases-error-boundary.tsx index 3cec77c9c7e39..c7e69bcd9d90e 100644 --- a/client/my-sites/purchases/site-level-purchases-error-boundary.tsx +++ b/client/my-sites/purchases/site-level-purchases-error-boundary.tsx @@ -7,9 +7,7 @@ import styled from '@emotion/styled'; const debug = debugFactory( 'calypso:site-level-purchases-error-boundary' ); -export default class SiteLevelPurchasesErrorBoundary extends React.Component< - SiteLevelPurchasesErrorBoundaryProps -> { +export default class SiteLevelPurchasesErrorBoundary extends React.Component< SiteLevelPurchasesErrorBoundaryProps > { constructor( props: SiteLevelPurchasesErrorBoundaryProps ) { super( props ); } diff --git a/packages/composite-checkout/src/components/checkout-steps.tsx b/packages/composite-checkout/src/components/checkout-steps.tsx index b808480c368ea..eeffd757f5c36 100644 --- a/packages/composite-checkout/src/components/checkout-steps.tsx +++ b/packages/composite-checkout/src/components/checkout-steps.tsx @@ -863,8 +863,7 @@ const StepNumber = styled.div< StepNumberProps & React.HTMLAttributes< HTMLDivEl // Reason: The IE media query needs to not have spaces within brackets otherwise ie11 doesn't read them // prettier-ignore @media all and (-ms-high-contrast:none), (-ms-high-contrast:active) { - z-index: ${ ( props ) => - props.isComplete ? '0' : '1' }; + z-index: ${ ( props ) => ( props.isComplete ? '0' : '1' ) }; } `; @@ -880,9 +879,7 @@ const StepNumberCompleted = styled( StepNumber )` // prettier-ignore @media all and (-ms-high-contrast:none), (-ms-high-contrast:active) { backface-visibility: visible; - z-index: ${ ( - props - ) => ( props.isComplete ? '1' : '0' ) }; + z-index: ${ ( props ) => ( props.isComplete ? '1' : '0' ) }; } svg { diff --git a/test/e2e/lib/pages/signup/pick-a-plan-page.js b/test/e2e/lib/pages/signup/pick-a-plan-page.js index 06ee98c8f1413..a32e7a69e24ca 100644 --- a/test/e2e/lib/pages/signup/pick-a-plan-page.js +++ b/test/e2e/lib/pages/signup/pick-a-plan-page.js @@ -48,7 +48,9 @@ export default class PickAPlanPage extends AsyncBaseContainer { if ( level === 'free' ) { if ( ! ( await driverHelper.isElementPresent( this.driver, selector ) ) ) { - selector = By.css( '.plans-features-main__banner-content button, .formatted-header__subtitle button' ); + selector = By.css( + '.plans-features-main__banner-content button, .formatted-header__subtitle button' + ); } } await driverHelper.waitTillPresentAndDisplayed(