Skip to content

Commit e552710

Browse files
committed
fix prettier
1 parent ebcd248 commit e552710

140 files changed

Lines changed: 471 additions & 547 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/javascript/authorChecklist/categories/newComponentCategory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function detectReactComponentInFile(filename: string): Promise<boolean | u
9191
};
9292
try {
9393
const {data} = await GithubUtils.octokit.repos.getContent(params);
94-
const content = nodeBase64ToUtf8('content' in data ? (data?.content ?? '') : '');
94+
const content = nodeBase64ToUtf8('content' in data ? data?.content ?? '' : '');
9595
return detectReactComponent(content, filename);
9696
} catch (error) {
9797
console.error('An unknown error occurred with the GitHub API: ', error, params);

.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,27 @@ function getTestBuildMessage(): string {
1313
[inputs[3]]: 'Web',
1414
};
1515

16-
const result = inputs.reduce(
17-
(acc, platform) => {
18-
const input = core.getInput(platform, {required: false});
16+
const result = inputs.reduce((acc, platform) => {
17+
const input = core.getInput(platform, {required: false});
1918

20-
if (!input) {
21-
acc[platform] = {link: 'N/A', qrCode: 'N/A'};
22-
return acc;
23-
}
19+
if (!input) {
20+
acc[platform] = {link: 'N/A', qrCode: 'N/A'};
21+
return acc;
22+
}
2423

25-
const isSuccess = input === 'success';
24+
const isSuccess = input === 'success';
2625

27-
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
28-
const qrCode = isSuccess
29-
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
30-
: `The QR code can't be generated, because the ${names[platform]} build failed`;
26+
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
27+
const qrCode = isSuccess
28+
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
29+
: `The QR code can't be generated, because the ${names[platform]} build failed`;
3130

32-
acc[platform] = {
33-
link,
34-
qrCode,
35-
};
36-
return acc;
37-
},
38-
{} as Record<TupleToUnion<typeof inputs>, {link: string; qrCode: string}>,
39-
);
31+
acc[platform] = {
32+
link,
33+
qrCode,
34+
};
35+
return acc;
36+
}, {} as Record<TupleToUnion<typeof inputs>, {link: string; qrCode: string}>);
4037

4138
const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube:
4239
| Android :robot: | iOS :apple: |

.github/libs/sanitizeStringForJSONParse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const replacer = (str: string): string =>
88
'\r': '\\r',
99
'\f': '\\f',
1010
'"': '\\"',
11-
})[str] ?? '';
11+
}[str] ?? '');
1212

1313
/**
1414
* Replace any characters in the string that will break JSON.parse for our Git Log output

src/CONST.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,14 +3643,11 @@ const CONST = {
36433643
SELF_SELECT: '__predefined_selfSelect',
36443644
},
36453645

3646-
EXPENSIFY_EMAILS_OBJECT: Object.entries(EMAIL).reduce(
3647-
(prev, [, email]) => {
3648-
// eslint-disable-next-line no-param-reassign
3649-
prev[email] = true;
3650-
return prev;
3651-
},
3652-
{} as Record<string, boolean>,
3653-
),
3646+
EXPENSIFY_EMAILS_OBJECT: Object.entries(EMAIL).reduce((prev, [, email]) => {
3647+
// eslint-disable-next-line no-param-reassign
3648+
prev[email] = true;
3649+
return prev;
3650+
}, {} as Record<string, boolean>),
36543651
EXPENSIFY_EMAILS: [
36553652
EMAIL.ACCOUNTING,
36563653
EMAIL.ACCOUNTS_PAYABLE,
@@ -5510,9 +5507,15 @@ const CONST = {
55105507
type: 'addAccountingIntegration',
55115508
autoCompleted: false,
55125509
mediaAttributes: {
5513-
[`${CLOUDFRONT_URL}/${connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.netsuite]}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_netsuite.png" data-expensify-width="1920" data-expensify-height="1080"`,
5514-
[`${CLOUDFRONT_URL}/${connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.quickbooksOnline]}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_qbo.png" data-expensify-width="1920" data-expensify-height="1080"`,
5515-
[`${CLOUDFRONT_URL}/${connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.xero]}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_xero.png" data-expensify-width="1920" data-expensify-height="1080"`,
5510+
[`${CLOUDFRONT_URL}/${
5511+
connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.netsuite]
5512+
}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_netsuite.png" data-expensify-width="1920" data-expensify-height="1080"`,
5513+
[`${CLOUDFRONT_URL}/${
5514+
connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.quickbooksOnline]
5515+
}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_qbo.png" data-expensify-width="1920" data-expensify-height="1080"`,
5516+
[`${CLOUDFRONT_URL}/${
5517+
connectionsVideoPaths[ONBOARDING_ACCOUNTING_MAPPING.xero]
5518+
}`]: `data-expensify-thumbnail-url="${CLOUDFRONT_URL}/images/walkthrough-connect_to_xero.png" data-expensify-width="1920" data-expensify-height="1080"`,
55165519
},
55175520
title: ({integrationName, workspaceAccountingLink}) => `Connect to [${integrationName}](${workspaceAccountingLink})`,
55185521
description: ({integrationName, workspaceAccountingLink}) =>

src/components/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function Avatar({
120120
src={avatarSource}
121121
height={iconSize}
122122
width={iconSize}
123-
fill={imageError ? (iconColors?.fill ?? theme.offline) : (iconColors?.fill ?? fill)}
123+
fill={imageError ? iconColors?.fill ?? theme.offline : iconColors?.fill ?? fill}
124124
additionalStyles={[StyleUtils.getAvatarBorderStyle(size, type), iconColors, iconAdditionalStyles]}
125125
/>
126126
</View>

src/components/Button/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function Button(
327327
<View style={[styles.mr2, !text && styles.mr0, iconStyles]}>
328328
<Icon
329329
src={icon}
330-
fill={isHovered ? (iconHoverFill ?? defaultFill) : (iconFill ?? defaultFill)}
330+
fill={isHovered ? iconHoverFill ?? defaultFill : iconFill ?? defaultFill}
331331
small={small}
332332
medium={medium}
333333
large={large}
@@ -342,7 +342,7 @@ function Button(
342342
{!isSplitButton ? (
343343
<Icon
344344
src={iconRight}
345-
fill={isHovered ? (iconHoverFill ?? defaultFill) : (iconFill ?? defaultFill)}
345+
fill={isHovered ? iconHoverFill ?? defaultFill : iconFill ?? defaultFill}
346346
small={small}
347347
medium={medium}
348348
large={large}
@@ -351,7 +351,7 @@ function Button(
351351
) : (
352352
<Icon
353353
src={iconRight}
354-
fill={isHovered ? (iconHoverFill ?? defaultFill) : (iconFill ?? defaultFill)}
354+
fill={isHovered ? iconHoverFill ?? defaultFill : iconFill ?? defaultFill}
355355
small={small}
356356
medium={medium}
357357
large={large}

src/components/CardPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type CardPreviewProps = CardPreviewOnyxProps;
2222
function CardPreview({privatePersonalDetails, session}: CardPreviewProps) {
2323
const styles = useThemeStyles();
2424
const {legalFirstName, legalLastName} = privatePersonalDetails ?? {};
25-
const cardHolder = legalFirstName && legalLastName ? `${legalFirstName} ${legalLastName}` : (session?.email ?? '');
25+
const cardHolder = legalFirstName && legalLastName ? `${legalFirstName} ${legalLastName}` : session?.email ?? '';
2626

2727
return (
2828
<View style={styles.walletCard}>

src/components/Composer/implementation/index.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -289,24 +289,28 @@ function Composer(
289289
onClear(currentText);
290290
}, [onClear, onSelectionChange]);
291291

292-
useImperativeHandle(ref, () => {
293-
const textInputRef = textInput.current;
294-
if (!textInputRef) {
295-
throw new Error('textInputRef is not available. This should never happen and indicates a developer error.');
296-
}
292+
useImperativeHandle(
293+
ref,
294+
() => {
295+
const textInputRef = textInput.current;
296+
if (!textInputRef) {
297+
throw new Error('textInputRef is not available. This should never happen and indicates a developer error.');
298+
}
297299

298-
return {
299-
...textInputRef,
300-
// Overwrite clear with our custom implementation, which mimics how the native TextInput's clear method works
301-
clear,
302-
// We have to redefine these methods as they are inherited by prototype chain and are not accessible directly
303-
blur: () => textInputRef.blur(),
304-
focus: () => textInputRef.focus(),
305-
get scrollTop() {
306-
return textInputRef.scrollTop;
307-
},
308-
};
309-
}, [clear]);
300+
return {
301+
...textInputRef,
302+
// Overwrite clear with our custom implementation, which mimics how the native TextInput's clear method works
303+
clear,
304+
// We have to redefine these methods as they are inherited by prototype chain and are not accessible directly
305+
blur: () => textInputRef.blur(),
306+
focus: () => textInputRef.focus(),
307+
get scrollTop() {
308+
return textInputRef.scrollTop;
309+
},
310+
};
311+
},
312+
[clear],
313+
);
310314

311315
const handleKeyPress = useCallback(
312316
(e: NativeSyntheticEvent<TextInputKeyPressEventData>) => {

src/components/ConfirmContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function ConfirmContent({
177177
<View style={[shouldCenterIcon ? styles.justifyContentCenter : null, styles.flexRow, styles.mb3]}>
178178
<Icon
179179
src={iconSource}
180-
fill={iconFill === false ? undefined : (iconFill ?? theme.icon)}
180+
fill={iconFill === false ? undefined : iconFill ?? theme.icon}
181181
width={iconWidth}
182182
height={iconHeight}
183183
additionalStyles={iconAdditionalStyles}

src/components/FlatList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function MVCPFlatList<TItem>({maintainVisibleContentPosition, horizontal = false
5757
if (!scrollRef.current) {
5858
return 0;
5959
}
60-
return horizontal ? (getScrollableNode(scrollRef.current)?.scrollLeft ?? 0) : (getScrollableNode(scrollRef.current)?.scrollTop ?? 0);
60+
return horizontal ? getScrollableNode(scrollRef.current)?.scrollLeft ?? 0 : getScrollableNode(scrollRef.current)?.scrollTop ?? 0;
6161
}, [horizontal]);
6262

6363
const getContentView = useCallback(() => getScrollableNode(scrollRef.current)?.childNodes[0], []);

0 commit comments

Comments
 (0)