diff --git a/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/view.js b/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/view.js index 859a93faec3bd..18fd5de0dcd65 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/view.js +++ b/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/view.js @@ -13,10 +13,10 @@ import { __, _x } from '@wordpress/i18n'; const view = ( { attributes, className, isEditView } ) => { // Expected values in save. - let days = ' ', - hours = ' ', - mins = ' ', - secs = ' '; + let days = ' '; + let hours = ' '; + let mins = ' '; + let secs = ' '; if ( isEditView ) { // Zero out. diff --git a/apps/notifications/src/panel/indices-to-html/index.js b/apps/notifications/src/panel/indices-to-html/index.js index a15d6bd3dccbc..c71e8845983e6 100644 --- a/apps/notifications/src/panel/indices-to-html/index.js +++ b/apps/notifications/src/panel/indices-to-html/index.js @@ -23,8 +23,8 @@ import noticon2gridicon from '../utils/noticon2gridicon'; */ function render_range( new_sub_text, new_sub_range, range_info, range_data, options ) { // Its time to build the outer shell of the range we're recursing into. - let new_container = null, - type_mappings; + let new_container = null; + let type_mappings; const new_classes = []; let range_info_type = range_info.type; @@ -183,8 +183,8 @@ function render_range( new_sub_text, new_sub_range, range_info, range_data, opti * @param {object} options Options for building chunks */ function build_chunks( sub_text, sub_ranges, range_data, container, options ) { - let text_start = null, - text_stop = null; + let text_start = null; + let text_stop = null; const ranges = JSON.parse( JSON.stringify( sub_ranges ) ); // clone through serialization diff --git a/apps/notifications/src/panel/templates/actions.jsx b/apps/notifications/src/panel/templates/actions.jsx index 9e95c4f7a9c1d..cd781af6f161e 100644 --- a/apps/notifications/src/panel/templates/actions.jsx +++ b/apps/notifications/src/panel/templates/actions.jsx @@ -23,7 +23,8 @@ import { getActions, getReferenceId } from '../helpers/notes'; const getType = ( note ) => ( null === getReferenceId( note, 'comment' ) ? 'post' : 'comment' ); const getInitialReplyValue = ( note, translate ) => { - let ranges, username; + let ranges; + let username; if ( 'user' === note.subject[ 0 ].ranges[ 0 ].type ) { // Build the username from the subject line diff --git a/apps/notifications/src/panel/templates/block-user.jsx b/apps/notifications/src/panel/templates/block-user.jsx index c6375ef9968a8..c002858334c75 100644 --- a/apps/notifications/src/panel/templates/block-user.jsx +++ b/apps/notifications/src/panel/templates/block-user.jsx @@ -35,11 +35,11 @@ export class UserBlock extends React.Component { * @returns {string} - Time stamp formatted for display or '' if input invalid */ getTimeString = ( timestamp ) => { - var DAY_IN_SECONDS = 3600 * 24, - MAX_LENGTH = 15, - parsedTime = Date.parse( timestamp ), - momentTime, - timeString; + var DAY_IN_SECONDS = 3600 * 24; + var MAX_LENGTH = 15; + var parsedTime = Date.parse( timestamp ); + var momentTime; + var timeString; if ( isNaN( parsedTime ) ) { return ''; @@ -65,13 +65,13 @@ export class UserBlock extends React.Component { }; render() { - var grav = this.props.block.media[ 0 ], - home_url = '', - home_title = '', - timeIndicator, - homeTemplate, - followLink, - noteActions; + var grav = this.props.block.media[ 0 ]; + var home_url = ''; + var home_title = ''; + var timeIndicator; + var homeTemplate; + var followLink; + var noteActions; if ( this.props.block.meta ) { if ( this.props.block.meta.links ) { diff --git a/apps/notifications/src/panel/templates/body.jsx b/apps/notifications/src/panel/templates/body.jsx index 7fd866ac10c6e..754a0c4c6afb6 100644 --- a/apps/notifications/src/panel/templates/body.jsx +++ b/apps/notifications/src/panel/templates/body.jsx @@ -52,8 +52,8 @@ export const NoteBody = createReactClass( { }, UNSAFE_componentWillMount: function () { - var note = this.props.note, - hasReplyBlock; + var note = this.props.note; + var hasReplyBlock; if ( note.meta && note.meta.ids.reply_comment ) { hasReplyBlock = diff --git a/apps/notifications/src/panel/templates/comment-reply-input.jsx b/apps/notifications/src/panel/templates/comment-reply-input.jsx index a937dc075c716..2977c50f0652b 100644 --- a/apps/notifications/src/panel/templates/comment-reply-input.jsx +++ b/apps/notifications/src/panel/templates/comment-reply-input.jsx @@ -150,12 +150,12 @@ const CommentReplyInput = createReactClass( { }, handleSubmit( event ) { - var wpObject, - submitComment, - component = this, - statusMessage, - successMessage = this.props.translate( 'Reply posted!' ), - linkMessage = this.props.translate( 'View your comment.' ); + var wpObject; + var submitComment; + var component = this; + var statusMessage; + var successMessage = this.props.translate( 'Reply posted!' ); + var linkMessage = this.props.translate( 'View your comment.' ); if ( event ) { event.preventDefault(); diff --git a/apps/notifications/src/panel/templates/follow-link.jsx b/apps/notifications/src/panel/templates/follow-link.jsx index 8835652d6974d..d80d93c195b41 100644 --- a/apps/notifications/src/panel/templates/follow-link.jsx +++ b/apps/notifications/src/panel/templates/follow-link.jsx @@ -69,7 +69,8 @@ export const FollowLink = createReactClass( { }, render: function () { - var gridicon_icon, link_text; + var gridicon_icon; + var link_text; if ( this.state.isFollowing ) { gridicon_icon = 'reader-following'; diff --git a/apps/notifications/src/panel/templates/summary-in-single.jsx b/apps/notifications/src/panel/templates/summary-in-single.jsx index ccad818e6c760..f57e2010fe6e5 100644 --- a/apps/notifications/src/panel/templates/summary-in-single.jsx +++ b/apps/notifications/src/panel/templates/summary-in-single.jsx @@ -94,7 +94,8 @@ var Header = React.createFactory( class SummaryInSingle extends React.Component { render() { - var header_url, parser; + var header_url; + var parser; if ( ! this.props.note.header || 0 === this.props.note.header.length ) { return ; } diff --git a/bin/build-metadata.js b/bin/build-metadata.js index d341e6e98f493..a89876d52bf0b 100755 --- a/bin/build-metadata.js +++ b/bin/build-metadata.js @@ -216,8 +216,8 @@ function removeAllNumberKeys( obj ) { function removeRegionCodeAndCountryDialCodeIfSameWithCountryDialCode( countryData ) { for ( let key in countryData ) { if ( countryData.hasOwnProperty( key ) ) { - const country = countryData[ key ], - { countryDialCode, dialCode } = country; + const country = countryData[ key ]; + const { countryDialCode, dialCode } = country; if ( countryDialCode === dialCode ) { delete country.regionCode; delete country.countryDialCode; diff --git a/client/blocks/conversations/empty.jsx b/client/blocks/conversations/empty.jsx index fbcdde8b77546..f0377e14e58e7 100644 --- a/client/blocks/conversations/empty.jsx +++ b/client/blocks/conversations/empty.jsx @@ -30,15 +30,15 @@ class ConversationsEmptyContent extends React.Component { /* eslint-disable wpcalypso/jsx-classname-namespace */ render() { const action = ( - - { this.props.translate( 'Find posts to follow' ) } - - ), - secondaryAction = null; + + { this.props.translate( 'Find posts to follow' ) } + + ); + const secondaryAction = null; return ( { - const siteId = props.siteId || getSelectedSiteId( state ), - productSlug = PLAN_PERSONAL, - productId = getPlan( PLAN_PERSONAL ).getProductId(); + const siteId = props.siteId || getSelectedSiteId( state ); + const productSlug = PLAN_PERSONAL; + const productId = getPlan( PLAN_PERSONAL ).getProductId(); return { isEligible: isEligibleForDomainToPaidPlanUpsell( state, siteId ), diff --git a/client/blocks/edit-gravatar/test/index.jsx b/client/blocks/edit-gravatar/test/index.jsx index bc851c74e7324..554cb4a7e70fa 100644 --- a/client/blocks/edit-gravatar/test/index.jsx +++ b/client/blocks/edit-gravatar/test/index.jsx @@ -23,7 +23,13 @@ jest.mock( 'lib/oauth-token', () => ( { jest.mock( 'lib/user', () => () => {} ); describe( 'EditGravatar', () => { - let EditGravatar, FilePicker, Gravatar, ImageEditor, VerifyEmailDialog, DropZone, sandbox; + let EditGravatar; + let FilePicker; + let Gravatar; + let ImageEditor; + let VerifyEmailDialog; + let DropZone; + let sandbox; const user = { email_verified: false, }; diff --git a/client/blocks/image-editor/image-editor-buttons.jsx b/client/blocks/image-editor/image-editor-buttons.jsx index e0e7cd8137088..cdf60f9ff3377 100644 --- a/client/blocks/image-editor/image-editor-buttons.jsx +++ b/client/blocks/image-editor/image-editor-buttons.jsx @@ -75,8 +75,8 @@ class ImageEditorButtons extends Component { } export default connect( ( state ) => { - const { src } = getImageEditorFileInfo( state ), - hasChanges = imageEditorHasChanges( state ); + const { src } = getImageEditorFileInfo( state ); + const hasChanges = imageEditorHasChanges( state ); return { src, diff --git a/client/blocks/image-editor/image-editor-crop.jsx b/client/blocks/image-editor/image-editor-crop.jsx index 9e39aa39764d3..d6aadd6dfc0cb 100644 --- a/client/blocks/image-editor/image-editor-crop.jsx +++ b/client/blocks/image-editor/image-editor-crop.jsx @@ -145,15 +145,15 @@ class ImageEditorCrop extends Component { return; } - const rotated = props.degrees % 180 !== 0, - newState = Object.assign( {}, this.state, newValues ), - newWidth = newState.right - newState.left, - newHeight = newState.bottom - newState.top; + const rotated = props.degrees % 180 !== 0; + const newState = Object.assign( {}, this.state, newValues ); + const newWidth = newState.right - newState.left; + const newHeight = newState.bottom - newState.top; - let imageWidth, - imageHeight, - finalWidth = newWidth, - finalHeight = newHeight; + let imageWidth; + let imageHeight; + let finalWidth = newWidth; + let finalHeight = newHeight; switch ( aspectRatio ) { case AspectRatios.ORIGINAL: @@ -218,8 +218,8 @@ class ImageEditorCrop extends Component { const { right, bottom } = this.state; const { minCropSize } = this.props; - let top = y, - left = x; + let top = y; + let left = x; if ( right - left <= minCropSize.width ) { left = right - minCropSize.width; @@ -239,8 +239,8 @@ class ImageEditorCrop extends Component { const { left, bottom } = this.state; const { minCropSize } = this.props; - let top = y, - right = x; + let top = y; + let right = x; if ( right - left <= minCropSize.width ) { right = left + minCropSize.width; @@ -260,8 +260,8 @@ class ImageEditorCrop extends Component { const { left, top } = this.state; const { minCropSize } = this.props; - let bottom = y, - right = x; + let bottom = y; + let right = x; if ( right - left <= minCropSize.width ) { right = left + minCropSize.width; @@ -281,8 +281,8 @@ class ImageEditorCrop extends Component { const { right, top } = this.state; const { minCropSize } = this.props; - let bottom = y, - left = x; + let bottom = y; + let left = x; if ( right - left <= minCropSize.width ) { left = right - minCropSize.width; @@ -299,9 +299,9 @@ class ImageEditorCrop extends Component { } onBorderDrag( x, y ) { - const { top, left, right, bottom } = this.state, - width = right - left, - height = bottom - top; + const { top, left, right, bottom } = this.state; + const width = right - left; + const height = bottom - top; this.setState( { top: y, @@ -316,10 +316,10 @@ class ImageEditorCrop extends Component { const { topBound, leftBound, rightBound, bottomBound } = this.props.bounds; - const currentTop = top - topBound, - currentLeft = left - leftBound, - currentWidth = right - left, - currentHeight = bottom - top; + const currentTop = top - topBound; + const currentLeft = left - leftBound; + const currentWidth = right - left; + const currentHeight = bottom - top; const imageWidth = rightBound - leftBound; let imageHeight = bottomBound - topBound; @@ -355,9 +355,9 @@ class ImageEditorCrop extends Component { render() { const { top, left, right, bottom } = this.state; - const width = right - left, - height = bottom - top, - handleClassName = 'image-editor__crop-handle'; + const width = right - left; + const height = bottom - top; + const handleClassName = 'image-editor__crop-handle'; const { topBound, leftBound, rightBound, bottomBound } = this.props.bounds; diff --git a/client/blocks/image-editor/index.jsx b/client/blocks/image-editor/index.jsx index f2c95f8e74337..6bbfc0984a74a 100644 --- a/client/blocks/image-editor/index.jsx +++ b/client/blocks/image-editor/index.jsx @@ -108,10 +108,10 @@ class ImageEditor extends React.Component { updateFileInfo = ( media ) => { const { site } = this.props; - let src, - fileName = 'default', - mimeType = 'image/png', - title = 'default'; + let src; + let fileName = 'default'; + let mimeType = 'image/png'; + let title = 'default'; if ( media ) { src = diff --git a/client/blocks/image-editor/test/image-editor-toolbar.jsx b/client/blocks/image-editor/test/image-editor-toolbar.jsx index 012fc52a5a67c..17ea89040fa5b 100644 --- a/client/blocks/image-editor/test/image-editor-toolbar.jsx +++ b/client/blocks/image-editor/test/image-editor-toolbar.jsx @@ -17,7 +17,8 @@ import { ImageEditorToolbar } from '../image-editor-toolbar'; import { useSandbox } from 'calypso/test-helpers/use-sinon'; describe( 'ImageEditorToolbar', () => { - let defaultProps, wrapper; + let defaultProps; + let wrapper; useSandbox( ( sandbox ) => { defaultProps = { diff --git a/client/blocks/keyring-connect-button/index.js b/client/blocks/keyring-connect-button/index.js index 31244994f865f..989880c4fce0d 100644 --- a/client/blocks/keyring-connect-button/index.js +++ b/client/blocks/keyring-connect-button/index.js @@ -170,9 +170,9 @@ class KeyringConnectButton extends Component { const { primary, service, translate } = this.props; const { isConnecting, isRefreshing } = this.state; const status = service ? this.getConnectionStatus() : 'unknown'; - let localPrimary = false, - warning = false, - label; + let localPrimary = false; + let warning = false; + let label; const isPending = 'unknown' === status || isRefreshing || isConnecting; diff --git a/client/blocks/post-status/index.jsx b/client/blocks/post-status/index.jsx index 78966aa36b83b..1981d76f69d4a 100644 --- a/client/blocks/post-status/index.jsx +++ b/client/blocks/post-status/index.jsx @@ -25,7 +25,9 @@ export function PostStatus( { translate, post, showAll, showIcon = true } ) { } const { sticky, status } = post; - let text, classModifier, icon; + let text; + let classModifier; + let icon; if ( sticky ) { text = translate( 'Sticky' ); classModifier = 'is-sticky'; diff --git a/client/blocks/product-purchase-features-list/custom-css.jsx b/client/blocks/product-purchase-features-list/custom-css.jsx index 4c47ea021371f..4bec95c61b885 100644 --- a/client/blocks/product-purchase-features-list/custom-css.jsx +++ b/client/blocks/product-purchase-features-list/custom-css.jsx @@ -21,12 +21,12 @@ function isCustomizeEnabled() { } function getEditCSSLink( selectedSite ) { - const adminUrl = selectedSite.URL + '/wp-admin/', - customizerInAdmin = - adminUrl + - 'customize.php?return=' + - encodeURIComponent( window.location.href ) + - '§ion=jetpack_custom_css'; + const adminUrl = selectedSite.URL + '/wp-admin/'; + const customizerInAdmin = + adminUrl + + 'customize.php?return=' + + encodeURIComponent( window.location.href ) + + '§ion=jetpack_custom_css'; return isCustomizeEnabled() ? '/customize/custom-css/' + selectedSite.slug : customizerInAdmin; } diff --git a/client/blocks/product-purchase-features-list/customize-theme.jsx b/client/blocks/product-purchase-features-list/customize-theme.jsx index fc65dd42a8b13..152eb97c1a00c 100644 --- a/client/blocks/product-purchase-features-list/customize-theme.jsx +++ b/client/blocks/product-purchase-features-list/customize-theme.jsx @@ -21,9 +21,9 @@ function isCustomizeEnabled() { } function getCustomizeLink( selectedSite ) { - const adminUrl = selectedSite.URL + '/wp-admin/', - customizerInAdmin = - adminUrl + 'customize.php?return=' + encodeURIComponent( window.location.href ); + const adminUrl = selectedSite.URL + '/wp-admin/'; + const customizerInAdmin = + adminUrl + 'customize.php?return=' + encodeURIComponent( window.location.href ); return isCustomizeEnabled() ? '/customize/' + selectedSite.slug : customizerInAdmin; } diff --git a/client/blocks/product-purchase-features-list/index.jsx b/client/blocks/product-purchase-features-list/index.jsx index 4fe1a84c381fb..067b6e1f83a03 100644 --- a/client/blocks/product-purchase-features-list/index.jsx +++ b/client/blocks/product-purchase-features-list/index.jsx @@ -403,8 +403,8 @@ export class ProductPurchaseFeaturesList extends Component { export default connect( ( state, ownProps ) => { - const selectedSite = getSelectedSite( state ), - selectedSiteId = getSelectedSiteId( state ); + const selectedSite = getSelectedSite( state ); + const selectedSiteId = getSelectedSiteId( state ); const isAutomatedTransfer = isSiteAutomatedTransfer( state, selectedSiteId ); return { diff --git a/client/blocks/product-purchase-features-list/test/product-purchase-features-list.jsx b/client/blocks/product-purchase-features-list/test/product-purchase-features-list.jsx index 8d45d4d94195c..df159671e61d7 100644 --- a/client/blocks/product-purchase-features-list/test/product-purchase-features-list.jsx +++ b/client/blocks/product-purchase-features-list/test/product-purchase-features-list.jsx @@ -56,7 +56,8 @@ describe( 'ProductPurchaseFeaturesList getFeatures() tests', () => { }, }; - let spy, spyWrong; + let spy; + let spyWrong; afterEach( () => { if ( spy ) { diff --git a/client/blocks/product-selector/index.jsx b/client/blocks/product-selector/index.jsx index ceeef1e305dd8..adf63d29eaa83 100644 --- a/client/blocks/product-selector/index.jsx +++ b/client/blocks/product-selector/index.jsx @@ -564,7 +564,8 @@ export class ProductSelector extends Component { ? addQueryArgs( { site: selectedSiteSlug }, product.link.url ) : product.link.url; - let purchase, isCurrent; + let purchase; + let isCurrent; if ( this.currentPlanIncludesProduct( product ) ) { purchase = this.getPurchaseByCurrentPlan(); isCurrent = currentPlanInSelectedTimeframe; diff --git a/client/blocks/reader-avatar/index.jsx b/client/blocks/reader-avatar/index.jsx index 2a921bdfaa3b1..63f804ec520ee 100644 --- a/client/blocks/reader-avatar/index.jsx +++ b/client/blocks/reader-avatar/index.jsx @@ -75,7 +75,8 @@ const ReaderAvatar = ( { const hasBothIcons = hasSiteIcon && hasAvatar; - let siteIconSize, gravatarSize; + let siteIconSize; + let gravatarSize; if ( isCompact ) { siteIconSize = 32; gravatarSize = hasBothIcons ? 24 : 32; diff --git a/client/blocks/reader-post-card/index.jsx b/client/blocks/reader-post-card/index.jsx index 90a55222a82d9..f44a93ad87354 100644 --- a/client/blocks/reader-post-card/index.jsx +++ b/client/blocks/reader-post-card/index.jsx @@ -70,8 +70,8 @@ class ReaderPostCard extends React.Component { }; handleCardClick = ( event ) => { - const rootNode = ReactDom.findDOMNode( this ), - selection = window.getSelection && window.getSelection(); + const rootNode = ReactDom.findDOMNode( this ); + const selection = window.getSelection && window.getSelection(); // if the click has modifier or was not primary, ignore it if ( event.button > 0 || event.metaKey || event.controlKey || event.shiftKey || event.altKey ) { diff --git a/client/blocks/reader-post-card/photo.jsx b/client/blocks/reader-post-card/photo.jsx index 91d552973ea99..4cde7858a7d23 100644 --- a/client/blocks/reader-post-card/photo.jsx +++ b/client/blocks/reader-post-card/photo.jsx @@ -78,7 +78,8 @@ class PostPhoto extends React.Component { backgroundPosition: 'center', }; - let newWidth, newHeight; + let newWidth; + let newHeight; if ( this.props.isExpanded ) { const cardWidth = this.state.cardWidth; const { width: naturalWidth, height: naturalHeight } = imageSize; diff --git a/client/blocks/signup-form/index.jsx b/client/blocks/signup-form/index.jsx index 93516c5fc6358..4adc133b4bdb6 100644 --- a/client/blocks/signup-form/index.jsx +++ b/client/blocks/signup-form/index.jsx @@ -65,12 +65,12 @@ import wooDnaConfig from 'calypso/jetpack-connect/woo-dna-config'; */ import './style.scss'; -const VALIDATION_DELAY_AFTER_FIELD_CHANGES = 2000, - debug = debugModule( 'calypso:signup-form:form' ); +const VALIDATION_DELAY_AFTER_FIELD_CHANGES = 2000; +const debug = debugModule( 'calypso:signup-form:form' ); -let usernamesSearched = [], - timesUsernameValidationFailed = 0, - timesPasswordValidationFailed = 0; +let usernamesSearched = []; +let timesUsernameValidationFailed = 0; +let timesPasswordValidationFailed = 0; const resetAnalyticsData = () => { usernamesSearched = []; @@ -331,8 +331,8 @@ class SignupForm extends Component { } handleChangeEvent = ( event ) => { - const name = event.target.name, - value = event.target.value; + const name = event.target.name; + const value = event.target.value; this.setState( { notice: null } ); diff --git a/client/components/chart/legend.jsx b/client/components/chart/legend.jsx index 69655781381c5..ec7fa58954716 100644 --- a/client/components/chart/legend.jsx +++ b/client/components/chart/legend.jsx @@ -31,13 +31,13 @@ export default class ChartLegend extends React.Component { }; render() { - const legendColors = [ 'chart__legend-color is-dark-blue' ], - activeTab = this.props.activeTab; + const legendColors = [ 'chart__legend-color is-dark-blue' ]; + const activeTab = this.props.activeTab; const legendItems = this.props.availableCharts.map( function ( legendItem, index ) { - const colorClass = legendColors[ index ], - checked = -1 !== this.props.activeCharts.indexOf( legendItem ), - tab = find( this.props.tabs, { attr: legendItem } ); + const colorClass = legendColors[ index ]; + const checked = -1 !== this.props.activeCharts.indexOf( legendItem ); + const tab = find( this.props.tabs, { attr: legendItem } ); return ( { }, [ dataCount, labelWidth, chartWidth ] ); const labels = data.map( function ( item, index ) { - const x = index * spacing + ( spacing - labelWidth ) / 2, - rightIndex = data.length - index - 1; + const x = index * spacing + ( spacing - labelWidth ) / 2; + const rightIndex = data.length - index - 1; let label; if ( rightIndex % divisor === 0 ) { diff --git a/client/components/data/query-user-purchases/index.jsx b/client/components/data/query-user-purchases/index.jsx index 571e5ecd7d21a..2347b7451f909 100644 --- a/client/components/data/query-user-purchases/index.jsx +++ b/client/components/data/query-user-purchases/index.jsx @@ -17,8 +17,8 @@ import { fetchUserPurchases } from 'calypso/state/purchases/actions'; class QueryUserPurchases extends Component { requestUserPurchases( nextProps ) { - const userChanged = nextProps && this.props.userId !== nextProps.userId, - props = nextProps || this.props; + const userChanged = nextProps && this.props.userId !== nextProps.userId; + const props = nextProps || this.props; if ( ( ! props.isFetchingUserPurchases && ! props.hasLoadedUserPurchasesFromServer ) || diff --git a/client/components/date-picker/index.jsx b/client/components/date-picker/index.jsx index 503989b1b14d7..0c8019e7ce881 100644 --- a/client/components/date-picker/index.jsx +++ b/client/components/date-picker/index.jsx @@ -93,7 +93,8 @@ class DatePicker extends PureComponent { return []; } - let i, event; + let i; + let event; const eventsInDay = []; for ( i = 0; i < this.props.events.length; i++ ) { diff --git a/client/components/domains/domain-registration-suggestion/index.jsx b/client/components/domains/domain-registration-suggestion/index.jsx index 377db6476f013..c2db2627c3a74 100644 --- a/client/components/domains/domain-registration-suggestion/index.jsx +++ b/client/components/domains/domain-registration-suggestion/index.jsx @@ -300,7 +300,8 @@ class DomainRegistrationSuggestion extends React.Component { return null; } - let title, progressBarProps; + let title; + let progressBarProps; if ( isRecommended ) { title = showStrikedOutPrice ? translate( 'Our Recommendation' ) : translate( 'Best Match' ); progressBarProps = { diff --git a/client/components/domains/domain-search-results/index.jsx b/client/components/domains/domain-search-results/index.jsx index 06858e227261b..2f4ccce0c361b 100644 --- a/client/components/domains/domain-search-results/index.jsx +++ b/client/components/domains/domain-search-results/index.jsx @@ -96,7 +96,8 @@ class DomainSearchResults extends React.Component { const domain = get( availableDomain, 'domain_name', lastDomainSearched ); - let availabilityElement, offer; + let availabilityElement; + let offer; if ( domain && diff --git a/client/components/domains/registrant-extra-info/with-contact-details-validation.jsx b/client/components/domains/registrant-extra-info/with-contact-details-validation.jsx index c41e367ea6668..8c50b8e531979 100644 --- a/client/components/domains/registrant-extra-info/with-contact-details-validation.jsx +++ b/client/components/domains/registrant-extra-info/with-contact-details-validation.jsx @@ -41,7 +41,9 @@ export function disableSubmitButton( children ) { * } */ export function interpretIMJVError( error, schema ) { - let explicitPath, errorCode, errorMessage; + let explicitPath; + let errorCode; + let errorMessage; if ( schema ) { // Search up the schema for an explicit errorField & message diff --git a/client/components/drop-zone/index.jsx b/client/components/drop-zone/index.jsx index 382054a9eb573..daf8813e74c42 100644 --- a/client/components/drop-zone/index.jsx +++ b/client/components/drop-zone/index.jsx @@ -139,9 +139,9 @@ export class DropZone extends React.Component { // as the `detail` property. // // See: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events - const detail = window.CustomEvent && event instanceof window.CustomEvent ? event.detail : event, - isValidDrag = this.props.onVerifyValidTransfer( detail.dataTransfer ), - isDraggingOverDocument = isValidDrag && this.dragEnterNodes.length; + const detail = window.CustomEvent && event instanceof window.CustomEvent ? event.detail : event; + const isValidDrag = this.props.onVerifyValidTransfer( detail.dataTransfer ); + const isDraggingOverDocument = isValidDrag && this.dragEnterNodes.length; this.setState( { isDraggingOverDocument: isDraggingOverDocument, diff --git a/client/components/drop-zone/test/index.jsx b/client/components/drop-zone/test/index.jsx index f0931cd123afe..e3e36785b8191 100644 --- a/client/components/drop-zone/test/index.jsx +++ b/client/components/drop-zone/test/index.jsx @@ -23,7 +23,8 @@ class Wrapper extends React.Component { } describe( 'index', () => { - let container, sandbox; + let container; + let sandbox; const requiredProps = { hideDropZone: () => {}, showDropZone: () => {}, @@ -73,8 +74,8 @@ describe( 'index', () => { } ); test( 'should render default content if none is provided', () => { - const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ), - content = TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content' ); + const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ); + const content = TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content' ); TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content-icon' ); TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content-text' ); @@ -83,10 +84,10 @@ describe( 'index', () => { test( 'should accept children to override the default content', () => { const tree = ReactDom.render( - React.createElement( DropZone, requiredProps, 'Hello World' ), - container - ), - content = TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content' ); + React.createElement( DropZone, requiredProps, 'Hello World' ), + container + ); + const content = TestUtils.findRenderedDOMComponentWithClass( tree, 'drop-zone__content' ); expect( content.textContent ).to.equal( 'Hello World' ); } ); @@ -106,8 +107,8 @@ describe( 'index', () => { } ); test( 'should highlight the drop zone when dragging over the body', () => { - const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ), - dragEnterEvent = new window.MouseEvent( 'dragenter' ); + const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ); + const dragEnterEvent = new window.MouseEvent( 'dragenter' ); window.dispatchEvent( dragEnterEvent ); @@ -117,8 +118,8 @@ describe( 'index', () => { test( 'should start observing the body for mutations when dragging over', () => { return new Promise( ( done ) => { - const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ), - dragEnterEvent = new window.MouseEvent( 'dragenter' ); + const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ); + const dragEnterEvent = new window.MouseEvent( 'dragenter' ); window.dispatchEvent( dragEnterEvent ); @@ -131,9 +132,9 @@ describe( 'index', () => { test( 'should stop observing the body for mutations upon drag ending', () => { return new Promise( ( done ) => { - const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ), - dragEnterEvent = new window.MouseEvent( 'dragenter' ), - dragLeaveEvent = new window.MouseEvent( 'dragleave' ); + const tree = ReactDom.render( React.createElement( DropZone, requiredProps ), container ); + const dragEnterEvent = new window.MouseEvent( 'dragenter' ); + const dragLeaveEvent = new window.MouseEvent( 'dragleave' ); window.dispatchEvent( dragEnterEvent ); window.dispatchEvent( dragLeaveEvent ); diff --git a/client/components/forms/counted-textarea/test/index.jsx b/client/components/forms/counted-textarea/test/index.jsx index 32d2b2c927dc4..e10a552027a15 100644 --- a/client/components/forms/counted-textarea/test/index.jsx +++ b/client/components/forms/counted-textarea/test/index.jsx @@ -41,8 +41,8 @@ describe( 'index', () => { } ); test( 'should pass props to the child textarea', () => { - const value = 'Hello World!', - placeholder = 'placeholder test'; + const value = 'Hello World!'; + const placeholder = 'placeholder test'; renderer.render( diff --git a/client/components/forms/form-button/index.jsx b/client/components/forms/form-button/index.jsx index a9c63ffa95bb2..f2bfe38efe0d3 100644 --- a/client/components/forms/form-button/index.jsx +++ b/client/components/forms/form-button/index.jsx @@ -31,8 +31,8 @@ class FormButton extends React.Component { }; render() { - const { children, className, isPrimary, ...props } = this.props, - buttonClasses = classNames( className, 'form-button' ); + const { children, className, isPrimary, ...props } = this.props; + const buttonClasses = classNames( className, 'form-button' ); return (