Skip to content

Commit 03df42f

Browse files
authored
Merge pull request #2841 from FromDoppler/no-task-check-prettier
[no-task] - Run prettier tool
2 parents 4dff8cd + 6fa168b commit 03df42f

24 files changed

Lines changed: 53 additions & 50 deletions

File tree

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
coverage/
22
src/doppler-types.ts
3-
*.js
43
*.md

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"intl-tel-input": "^18.0.0",
3636
"jwt-decode": "^3.1.2",
3737
"polyfill-array-includes": "^2.0.0",
38-
"prettier": "^3.7.1",
38+
"prettier": "^3.8.1",
3939
"prettier-check": "^2.0.0",
4040
"promise-polyfill": "^8.2.3",
4141
"query-string": "^7.1.1",

src/components/BuyProcess/LandingPacksSelection/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ describe('LandingPacksSelection component', () => {
3838
getLandingPacks: (async) => ({ success: false, value: [] }),
3939
},
4040
dopplerLegacyClient: {
41-
getLandingPagesAmount: async () => ({ success: true, value: 5 })
42-
}
41+
getLandingPagesAmount: async () => ({ success: true, value: 5 }),
42+
},
4343
};
4444
// Act
4545
render(

src/components/BuyProcess/ShoppingCart/CheckoutButton/AddOn/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const AddOnCheckoutButton = InjectAppServices(
3535
const createTimeout = useTimeout();
3636
const query = useQueryParams();
3737
const { isFreeAccount } = appSessionRef.current.userData.user.plan;
38-
const accountType = query.get(ACCOUNT_TYPE) ?? isFreeAccount ? FREE_ACCOUNT : PAID_ACCOUNT;
38+
const accountType = (query.get(ACCOUNT_TYPE) ?? isFreeAccount) ? FREE_ACCOUNT : PAID_ACCOUNT;
3939

4040
const proceedToBuy = async () => {
4141
setStatus(SAVING);

src/components/BuyProcess/ShoppingCart/CheckoutButton/LandingPackCheckoutButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const LandingPackCheckoutButton = InjectAppServices(
3232
const createTimeout = useTimeout();
3333
const query = useQueryParams();
3434
const { isFreeAccount } = appSessionRef.current.userData.user.plan;
35-
const accountType = query.get(ACCOUNT_TYPE) ?? isFreeAccount ? FREE_ACCOUNT : PAID_ACCOUNT;
35+
const accountType = (query.get(ACCOUNT_TYPE) ?? isFreeAccount) ? FREE_ACCOUNT : PAID_ACCOUNT;
3636

3737
const proceedToBuy = async () => {
3838
setStatus(SAVING);

src/components/BuyProcess/ShoppingCart/Promocode/PromocodeMessages/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PromocodeMessages } from '.';
22
import { render, screen } from '@testing-library/react';
33
import '@testing-library/jest-dom/extend-expect';
4-
import IntlProvider from '../../../../../i18n/DopplerIntlProvider.double-with-ids-as-values';
4+
import IntlProvider from '../../../../../i18n/DopplerIntlProvider.double-with-ids-as-values';
55

66
describe('PromocodeMessages component', () => {
77
it('should render PromocodeMessages with not allow promocode component', async () => {

src/components/BuyProcess/ShoppingCart/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ export const ShoppingCart = InjectAppServices(
331331
);
332332

333333
const total =
334-
(addMarketingPlan ? amountDetailsData?.value?.currentMonthTotal ?? 0 : 0) +
334+
(addMarketingPlan ? (amountDetailsData?.value?.currentMonthTotal ?? 0) : 0) +
335335
(amountDetailsLandingPacksData?.value?.currentMonthTotal ?? 0) +
336336
(amountDetailsAddOnPlanData?.value?.currentMonthTotal ?? 0);
337337

338338
const nextMonthTotal =
339-
(addMarketingPlan ? amountDetailsData?.value?.nextMonthTotal ?? 0 : 0) +
339+
(addMarketingPlan ? (amountDetailsData?.value?.nextMonthTotal ?? 0) : 0) +
340340
(amountDetailsLandingPacksData?.value?.nextMonthTotal ?? 0) +
341341
(amountDetailsAddOnPlanData?.value?.nextMonthTotal ?? 0);
342342

src/components/BuyProcess/ShoppingCart/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ export const getBuyButton = ({
11311131
planType={selectedMarketingPlan?.type}
11321132
planId={selectedMarketingPlan?.id}
11331133
discountId={selectedDiscount?.id}
1134-
promocode={promotion?.canApply ? promotion?.promocode ?? '' : ''}
1134+
promocode={promotion?.canApply ? (promotion?.promocode ?? '') : ''}
11351135
monthPlan={selectedDiscount?.numberMonths}
11361136
newCheckoutEnabled={redirectNewCheckout}
11371137
chatPlanId={selectedPlanChat?.planChat?.planId}

src/components/CollaborationInvite/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ export const CollaboratorsInvite = InjectAppServices(
147147
</header>
148148
<h5>{_('signup.invitation_signup_title')}</h5>
149149
<p id="content-subtitle" className="content-subtitle m-t-24">
150-
<FormattedMessage
151-
id={`signup.sign_up_sub`}
150+
<FormattedMessage
151+
id={`signup.sign_up_sub`}
152152
values={{
153153
br: <br />,
154154
}}

src/components/ContactPolicy/ContactPolicy.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ export const ContactPolicy = InjectAppServices(
159159
const hourFromEmpty = values.timeRestriction.hourFrom === '';
160160
const hourToEmpty = values.timeRestriction.hourTo === '';
161161

162-
if (hourFromEmpty || hourToEmpty) { // hours are empty
162+
if (hourFromEmpty || hourToEmpty) {
163+
// hours are empty
163164
errors.timeRestrictionHourFrom = hourFromEmpty;
164165
errors.timeRestrictionHourTo = hourToEmpty;
165166
errors.messageForTimeSlot = (
166167
<FormattedMessageMarkdown id="validation_messages.error_required_field" />
167168
);
168-
} else { // hours are not empty
169+
} else {
170+
// hours are not empty
169171
const hourFromOutOfRange =
170172
values.timeRestriction.hourFrom < 0 || values.timeRestriction.hourFrom > 23;
171173
const hourToOutOfRange =
@@ -177,7 +179,8 @@ export const ContactPolicy = InjectAppServices(
177179
errors.messageForTimeSlot = (
178180
<FormattedMessageMarkdown id="contact_policy.time_restriction.error_invalid_range_of_hours_msg" />
179181
);
180-
} else if (values.timeRestriction.hourFrom === values.timeRestriction.hourTo) { // hours are equal
182+
} else if (values.timeRestriction.hourFrom === values.timeRestriction.hourTo) {
183+
// hours are equal
181184
errors.timeRestrictionHourFrom = true;
182185
errors.timeRestrictionHourTo = true;
183186
errors.messageForTimeSlot = (
@@ -406,9 +409,7 @@ export const ContactPolicy = InjectAppServices(
406409
onToggle={() => hideMessage()}
407410
/>
408411

409-
<p
410-
className="dp-color-gray dp-text--italic m-t-6"
411-
>
412+
<p className="dp-color-gray dp-text--italic m-t-6">
412413
<strong className="dp-color-red">
413414
{_('contact_policy.time_restriction.time_slot_hint_title')}
414415
</strong>{' '}

0 commit comments

Comments
 (0)