From ae1f89c7b71fefeab6214682cf351e89af931a7d Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Wed, 9 May 2018 16:38:43 +0300 Subject: [PATCH] Update Prettier --- src/components/BookingBreakdown/LineItemUnitPrice.js | 4 +++- .../EditListingLocationPanel.js | 4 +++- .../FieldCurrencyInput/FieldCurrencyInput.js | 10 ++++++++-- .../StripeBankAccountTokenInputField.js | 7 ++++++- .../TransactionPanel/TransactionPanel.helpers.js | 4 +++- src/forms/BookingDatesForm/EstimatedBreakdownMaybe.js | 4 +++- yarn.lock | 4 ++-- 7 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/components/BookingBreakdown/LineItemUnitPrice.js b/src/components/BookingBreakdown/LineItemUnitPrice.js index 6d521bf9..dc908f12 100644 --- a/src/components/BookingBreakdown/LineItemUnitPrice.js +++ b/src/components/BookingBreakdown/LineItemUnitPrice.js @@ -11,7 +11,9 @@ const LineItemUnitPrice = props => { const isDaily = unitType === LINE_ITEM_DAY; const translationKey = isNightly ? 'BookingBreakdown.pricePerNight' - : isDaily ? 'BookingBreakdown.pricePerDay' : 'BookingBreakdown.pricePerQuantity'; + : isDaily + ? 'BookingBreakdown.pricePerDay' + : 'BookingBreakdown.pricePerQuantity'; const unitPurchase = transaction.attributes.lineItems.find( item => item.code === unitType && !item.reversal diff --git a/src/components/EditListingLocationPanel/EditListingLocationPanel.js b/src/components/EditListingLocationPanel/EditListingLocationPanel.js index 27c3b5d0..c9aa33c0 100644 --- a/src/components/EditListingLocationPanel/EditListingLocationPanel.js +++ b/src/components/EditListingLocationPanel/EditListingLocationPanel.js @@ -59,7 +59,9 @@ const EditListingLocationPanel = props => { initialValues={initialSearchFormValues} onSubmit={values => { const { building = '', location } = values; - const { selectedPlace: { address, origin } } = location; + const { + selectedPlace: { address, origin }, + } = location; const updateValues = { geolocation: origin, publicData: { diff --git a/src/components/FieldCurrencyInput/FieldCurrencyInput.js b/src/components/FieldCurrencyInput/FieldCurrencyInput.js index 4893253a..998227b0 100644 --- a/src/components/FieldCurrencyInput/FieldCurrencyInput.js +++ b/src/components/FieldCurrencyInput/FieldCurrencyInput.js @@ -118,7 +118,10 @@ class CurrencyInputComponent extends Component { onInputBlur(event) { event.preventDefault(); event.stopPropagation(); - const { currencyConfig, input: { onBlur } } = this.props; + const { + currencyConfig, + input: { onBlur }, + } = this.props; this.setState(prevState => { if (onBlur) { // If parent component has provided onBlur function, call it with current price. @@ -134,7 +137,10 @@ class CurrencyInputComponent extends Component { onInputFocus(event) { event.preventDefault(); event.stopPropagation(); - const { currencyConfig, input: { onFocus } } = this.props; + const { + currencyConfig, + input: { onFocus }, + } = this.props; this.setState(prevState => { if (onFocus) { // If parent component has provided onFocus function, call it with current price. diff --git a/src/components/StripeBankAccountTokenInputField/StripeBankAccountTokenInputField.js b/src/components/StripeBankAccountTokenInputField/StripeBankAccountTokenInputField.js index f5cb4fae..7c790fad 100644 --- a/src/components/StripeBankAccountTokenInputField/StripeBankAccountTokenInputField.js +++ b/src/components/StripeBankAccountTokenInputField/StripeBankAccountTokenInputField.js @@ -108,7 +108,12 @@ class TokenInputFieldComponent extends Component { * @param {Object} values - values from different input types */ requestToken(values) { - const { country, currency, input: { onChange }, intl } = this.props; + const { + country, + currency, + input: { onChange }, + intl, + } = this.props; // First we have to clear the current token value so the parent // form doesn't submit with an old value. diff --git a/src/components/TransactionPanel/TransactionPanel.helpers.js b/src/components/TransactionPanel/TransactionPanel.helpers.js index b36113bb..1f79e0af 100644 --- a/src/components/TransactionPanel/TransactionPanel.helpers.js +++ b/src/components/TransactionPanel/TransactionPanel.helpers.js @@ -99,7 +99,9 @@ export const AddressLinkMaybe = props => { const { lat, lng } = geolocation || {}; const hrefToGoogleMaps = geolocation ? `https://maps.google.com/?q=${lat},${lng}` - : address ? `https://maps.google.com/?q=${encodeURIComponent(address)}` : null; + : address + ? `https://maps.google.com/?q=${encodeURIComponent(address)}` + : null; const fullAddress = typeof building === 'string' && building.length > 0 ? `${building}, ${address}` : address; diff --git a/src/forms/BookingDatesForm/EstimatedBreakdownMaybe.js b/src/forms/BookingDatesForm/EstimatedBreakdownMaybe.js index 949df930..a8f846d8 100644 --- a/src/forms/BookingDatesForm/EstimatedBreakdownMaybe.js +++ b/src/forms/BookingDatesForm/EstimatedBreakdownMaybe.js @@ -63,7 +63,9 @@ const estimatedTransaction = (unitType, bookingStart, bookingEnd, unitPrice, qua const unitCount = isNightly ? nightsBetween(bookingStart, bookingEnd) - : isDaily ? daysBetween(bookingStart, bookingEnd) : quantity; + : isDaily + ? daysBetween(bookingStart, bookingEnd) + : quantity; const totalPrice = estimatedTotalPrice(unitPrice, unitCount); diff --git a/yarn.lock b/yarn.lock index 076215e5..e6951a02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6498,8 +6498,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" + version "1.12.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" pretty-bytes@^4.0.2: version "4.0.2"