Skip to content

Commit

Permalink
Fix style for all files
Browse files Browse the repository at this point in the history
  • Loading branch information
iwiznia committed Oct 3, 2024
1 parent 580d412 commit 9e1f21a
Show file tree
Hide file tree
Showing 109 changed files with 320 additions and 324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function run() {
if (date) {
message += `on ${date}`;
}
message += `🚀`;
message += '🚀';
message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`;

Expand Down
2 changes: 1 addition & 1 deletion .github/libs/GitUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function getCommitHistoryAsJSON(fromTag: string, toTag: string): Promise<CommitT
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
return reject(new Error(stderr));
}

resolve(stdout);
Expand Down
2 changes: 1 addition & 1 deletion .github/libs/GithubUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class GithubUtils {
const merger = internalQAPRMap[URL];
const mergerMention = `@${merger}`;
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
issueBody += `${URL}`;
issueBody += URL;
issueBody += ` - ${mergerMention}`;
issueBody += '\r\n';
});
Expand Down
32 changes: 16 additions & 16 deletions desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ const electronUpdater = (browserWindow: BrowserWindow): PlatformSpecificUpdater
init: () => {
autoUpdater.on(ELECTRON_EVENTS.UPDATE_DOWNLOADED, (info) => {
const systemMenu = Menu.getApplicationMenu();
const updateMenuItem = systemMenu?.getMenuItemById(`update`);
const checkForUpdatesMenuItem = systemMenu?.getMenuItemById(`checkForUpdates`);
const updateMenuItem = systemMenu?.getMenuItemById('update');
const checkForUpdatesMenuItem = systemMenu?.getMenuItemById('checkForUpdates');

downloadedVersion = info.version;

Expand Down Expand Up @@ -343,14 +343,14 @@ const mainWindow = (): Promise<void> => {
const initialMenuTemplate: MenuItemConstructorOptions[] = [
{
id: 'mainMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.mainMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.mainMenu'),
submenu: [
{id: 'about', role: 'about'},
{id: 'update', label: Localize.translate(preferredLocale, `desktopApplicationMenu.update`), click: quitAndInstallWithUpdate, visible: false},
{id: 'checkForUpdates', label: Localize.translate(preferredLocale, `desktopApplicationMenu.checkForUpdates`), click: manuallyCheckForUpdates},
{id: 'update', label: Localize.translate(preferredLocale, 'desktopApplicationMenu.update'), click: quitAndInstallWithUpdate, visible: false},
{id: 'checkForUpdates', label: Localize.translate(preferredLocale, 'desktopApplicationMenu.checkForUpdates'), click: manuallyCheckForUpdates},
{
id: 'viewShortcuts',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.viewShortcuts`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.viewShortcuts'),
accelerator: 'CmdOrCtrl+J',
click: () => {
showKeyboardShortcutsPage(browserWindow);
Expand All @@ -368,12 +368,12 @@ const mainWindow = (): Promise<void> => {
},
{
id: 'fileMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.fileMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.fileMenu'),
submenu: [{id: 'closeWindow', role: 'close', accelerator: 'Cmd+w'}],
},
{
id: 'editMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.editMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.editMenu'),
submenu: [
{id: 'undo', role: 'undo'},
{id: 'redo', role: 'redo'},
Expand All @@ -396,7 +396,7 @@ const mainWindow = (): Promise<void> => {
{type: 'separator'},
{
id: 'speechSubmenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.speechSubmenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.speechSubmenu'),
submenu: [
{id: 'startSpeaking', role: 'startSpeaking'},
{id: 'stopSpeaking', role: 'stopSpeaking'},
Expand All @@ -406,7 +406,7 @@ const mainWindow = (): Promise<void> => {
},
{
id: 'viewMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.viewMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.viewMenu'),
submenu: [
{id: 'reload', role: 'reload'},
{id: 'forceReload', role: 'forceReload'},
Expand All @@ -421,7 +421,7 @@ const mainWindow = (): Promise<void> => {
},
{
id: 'historyMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.historyMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.historyMenu'),
submenu: [
{
id: 'back',
Expand Down Expand Up @@ -462,33 +462,33 @@ const mainWindow = (): Promise<void> => {
},
{
id: 'helpMenu',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.helpMenu`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.helpMenu'),
role: 'help',
submenu: [
{
id: 'learnMore',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.learnMore`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.learnMore'),
click: () => {
shell.openExternal(CONST.MENU_HELP_URLS.LEARN_MORE);
},
},
{
id: 'documentation',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.documentation`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.documentation'),
click: () => {
shell.openExternal(CONST.MENU_HELP_URLS.DOCUMENTATION);
},
},
{
id: 'communityDiscussions',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.communityDiscussions`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.communityDiscussions'),
click: () => {
shell.openExternal(CONST.MENU_HELP_URLS.COMMUNITY_DISCUSSIONS);
},
},
{
id: 'searchIssues',
label: Localize.translate(preferredLocale, `desktopApplicationMenu.searchIssues`),
label: Localize.translate(preferredLocale, 'desktopApplicationMenu.searchIssues'),
click: () => {
shell.openExternal(CONST.MENU_HELP_URLS.SEARCH_ISSUES);
},
Expand Down
10 changes: 5 additions & 5 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ const CONST = {
EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT_FILE_NAME: 'ExpensifyPackageForSageIntacct',
SAGE_INTACCT_INSTRUCTIONS: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct',
HOW_TO_CONNECT_TO_SAGE_INTACCT: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct#how-to-connect-to-sage-intacct',
PRICING: `https://www.expensify.com/pricing`,
PRICING: 'https://www.expensify.com/pricing',
COMPANY_CARDS_HELP: 'https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Commercial-Card-Feeds',
CUSTOM_REPORT_NAME_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/spending-insights/Custom-Templates',
CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings',
Expand Down Expand Up @@ -4540,7 +4540,7 @@ const CONST = {
autoCompleted: false,
title: 'Meet your setup specialist',
description: ({adminsRoomLink}) =>
`Meet your setup specialist, who can answer any questions as you get started with Expensify. Yes, a real human!\n` +
'Meet your setup specialist, who can answer any questions as you get started with Expensify. Yes, a real human!\n' +
'\n' +
`Chat with the specialist in your [#admins room](${adminsRoomLink}).`,
},
Expand Down Expand Up @@ -5676,8 +5676,8 @@ const CONST = {
id: 'approvals' as const,
alias: 'approvals' as const,
name: 'Advanced Approvals' as const,
title: `workspace.upgrade.approvals.title` as const,
description: `workspace.upgrade.approvals.description` as const,
title: 'workspace.upgrade.approvals.title' as const,
description: 'workspace.upgrade.approvals.description' as const,
icon: 'AdvancedApprovalsSquare',
},
glCodes: {
Expand Down Expand Up @@ -5747,7 +5747,7 @@ const CONST = {
BOOT_SPLASH_STATE: {
VISIBLE: 'visible',
READY_TO_BE_HIDDEN: 'readyToBeHidden',
HIDDEN: `hidden`,
HIDDEN: 'hidden',
},

CSV_IMPORT_COLUMNS: {
Expand Down
12 changes: 6 additions & 6 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const ROUTES = {
SETTINGS_TROUBLESHOOT: 'settings/troubleshoot',
SETTINGS_CONSOLE: {
route: 'settings/troubleshoot/console',
getRoute: (backTo?: string) => getUrlWithBackToParam(`settings/troubleshoot/console`, backTo),
getRoute: (backTo?: string) => getUrlWithBackToParam('settings/troubleshoot/console', backTo),
},
SETTINGS_SHARE_LOG: {
route: 'settings/troubleshoot/console/share-log',
Expand Down Expand Up @@ -580,7 +580,7 @@ const ROUTES = {
WORKSPACE_NEW_ROOM: 'workspace/new-room',
WORKSPACE_INITIAL: {
route: 'settings/workspaces/:policyID',
getRoute: (policyID: string, backTo?: string) => `${getUrlWithBackToParam(`settings/workspaces/${policyID}`, backTo)}` as const,
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}`, backTo) as const,

Check failure on line 583 in src/ROUTES.ts

View workflow job for this annotation

GitHub Actions / typecheck

A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.
},
WORKSPACE_INVITE: {
route: 'settings/workspaces/:policyID/invite',
Expand Down Expand Up @@ -1129,19 +1129,19 @@ const ROUTES = {
TRACK_TRAINING_MODAL: 'track-training',
ONBOARDING_ROOT: {
route: 'onboarding',
getRoute: (backTo?: string) => getUrlWithBackToParam(`onboarding`, backTo),
getRoute: (backTo?: string) => getUrlWithBackToParam('onboarding', backTo),
},
ONBOARDING_PERSONAL_DETAILS: {
route: 'onboarding/personal-details',
getRoute: (backTo?: string) => getUrlWithBackToParam(`onboarding/personal-details`, backTo),
getRoute: (backTo?: string) => getUrlWithBackToParam('onboarding/personal-details', backTo),
},
ONBOARDING_WORK: {
route: 'onboarding/work',
getRoute: (backTo?: string) => getUrlWithBackToParam(`onboarding/work`, backTo),
getRoute: (backTo?: string) => getUrlWithBackToParam('onboarding/work', backTo),
},
ONBOARDING_PURPOSE: {
route: 'onboarding/purpose',
getRoute: (backTo?: string) => getUrlWithBackToParam(`onboarding/purpose`, backTo),
getRoute: (backTo?: string) => getUrlWithBackToParam('onboarding/purpose', backTo),
},
WELCOME_VIDEO_ROOT: 'onboarding/welcome-video',
EXPLANATION_MODAL_ROOT: 'onboarding/explanation',
Expand Down
8 changes: 5 additions & 3 deletions src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ function PaymentCardCurrencyHeader({isSectionList}: {isSectionList?: boolean}) {
return (
<View style={[isSectionList && styles.mh5]}>
<Text style={[styles.mt3, isSectionList && styles.mb5]}>
{`${translate('billingCurrency.note')}`}{' '}
{translate('billingCurrency.note')}{' '}
<TextLink
style={styles.link}
href={CONST.PRICING}
>{`${translate('billingCurrency.noteLink')}`}</TextLink>{' '}
{`${translate('billingCurrency.noteDetails')}`}
>
{translate('billingCurrency.noteLink')}
</TextLink>{' '}
{translate('billingCurrency.noteDetails')}
</Text>
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddPaymentCard/PaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function IAcceptTheLabel() {

return (
<Text>
{`${translate('common.iAcceptThe')}`}
<TextLink href={CONST.TERMS_URL}>{`${translate('common.addCardTermsOfService')}`}</TextLink> {`${translate('common.and')}`}
{translate('common.iAcceptThe')}
<TextLink href={CONST.TERMS_URL}>{translate('common.addCardTermsOfService')}</TextLink> {translate('common.and')}
<TextLink href={CONST.PRIVACY_URL}> {` ${translate('common.privacyPolicy')} `}</TextLink>
</Text>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ApprovalWorkflowSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function ApprovalWorkflowSection({approvalWorkflow, onPress}: ApprovalWorkflowSe

const approverTitle = useCallback(
(index: number) =>
approvalWorkflow.approvers.length > 1 ? `${toLocaleOrdinal(index + 1, true)} ${translate('workflowsPage.approver').toLowerCase()}` : `${translate('workflowsPage.approver')}`,
approvalWorkflow.approvers.length > 1 ? `${toLocaleOrdinal(index + 1, true)} ${translate('workflowsPage.approver').toLowerCase()}` : translate('workflowsPage.approver'),
[approvalWorkflow.approvers.length, toLocaleOrdinal, translate],
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function AttachmentModal({
}

if (typeof sourceURL === 'string') {
const fileName = type === CONST.ATTACHMENT_TYPE.SEARCH ? FileUtils.getFileName(`${sourceURL}`) : file?.name;
const fileName = type === CONST.ATTACHMENT_TYPE.SEARCH ? FileUtils.getFileName(sourceURL) : file?.name;
fileDownload(sourceURL, fileName ?? '');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function extractAttachments(
}

uniqueSources.add(source);
const fileName = attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || FileUtils.getFileName(`${source}`);
const fileName = attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || FileUtils.getFileName(source);
attachments.unshift({
source: tryResolveUrlFromApiRoot(attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]),
isAuthTokenRequired: !!attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE],
Expand All @@ -58,7 +58,7 @@ function extractAttachments(
}

uniqueSources.add(source);
let fileName = attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || FileUtils.getFileName(`${source}`);
let fileName = attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || FileUtils.getFileName(source);

const width = (attribs['data-expensify-width'] && parseInt(attribs['data-expensify-width'], 10)) || undefined;
const height = (attribs['data-expensify-height'] && parseInt(attribs['data-expensify-height'], 10)) || undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Composer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function Composer(
numberOfLines={1}
ref={textRef}
>
{`${caretContent}`}
{caretContent}
</Text>
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EReceiptThumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function EReceiptThumbnail({transaction, borderRadius, fileExtension, isReceiptT
const secondaryColor = colorStyles?.color;
const transactionDetails = ReportUtils.getTransactionDetails(transaction);
const transactionMCCGroup = transactionDetails?.mccGroup;
const MCCIcon = transactionMCCGroup ? MCCIcons[`${transactionMCCGroup}`] : undefined;
const MCCIcon = transactionMCCGroup ? MCCIcons[transactionMCCGroup] : undefined;
const tripIcon = TripReservationUtils.getTripEReceiptIcon(transaction);

let receiptIconWidth: number = variables.eReceiptIconWidth;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/FormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function FormProvider(
forwardedRef: ForwardedRef<FormRef>,
) {
const [network] = useOnyx(ONYXKEYS.NETWORK);
const [formState] = useOnyx<OnyxFormKey, Form>(`${formID}`);
const [formState] = useOnyx<OnyxFormKey, Form>(formID);
const [draftValues] = useOnyx<OnyxFormDraftKey, Form>(`${formID}Draft`);
const {preferredLocale, translate} = useLocalize();
const inputRefs = useRef<InputRefs>({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function VideoRenderer({tnode, key}: VideoRendererProps) {
const htmlAttribs = tnode.attributes;
const attrHref = htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE] || htmlAttribs.src || htmlAttribs.href || '';
const sourceURL = tryResolveUrlFromApiRoot(attrHref);
const fileName = FileUtils.getFileName(`${sourceURL}`);
const fileName = FileUtils.getFileName(sourceURL);
const thumbnailUrl = tryResolveUrlFromApiRoot(htmlAttribs[CONST.ATTACHMENT_THUMBNAIL_URL_ATTRIBUTE]);
const width = Number(htmlAttribs[CONST.ATTACHMENT_THUMBNAIL_WIDTH_ATTRIBUTE]);
const height = Number(htmlAttribs[CONST.ATTACHMENT_THUMBNAIL_HEIGHT_ATTRIBUTE]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type IndicatorProps = IndicatorOnyxProps;
function Indicator({reimbursementAccount, policies, bankAccountList, fundList, userWallet, walletTerms, loginList}: IndicatorOnyxProps) {
const theme = useTheme();
const styles = useThemeStyles();
const [allConnectionSyncProgresses] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS}`);
const [allConnectionSyncProgresses] = useOnyx(ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS);

// If a policy was just deleted from Onyx, then Onyx will pass a null value to the props, and
// those should be cleaned out before doing any error checking
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfilingToolMenu/index.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function ProfilingToolMenu() {
return (
<BaseProfilingToolMenu
pathToBeUsed={RNFS.DownloadDirectoryPath}
displayPath={`${CONST.DOWNLOADS_PATH}`}
displayPath={CONST.DOWNLOADS_PATH}
showShareButton
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
[getViolationsForField],
);

let amountDescription = `${translate('iou.amount')}`;
let amountDescription = translate('iou.amount');

const hasRoute = TransactionUtils.hasRoute(transactionBackup ?? transaction, isDistanceRequest);
const rateID = TransactionUtils.getRateID(transaction) ?? '-1';
Expand Down
Loading

0 comments on commit 9e1f21a

Please sign in to comment.