diff --git a/jest.config.js b/jest.config.js index 904f49eb1f491..c397bbc89b91d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -37,5 +37,6 @@ module.exports = { '^group-ib-fp$': '/__mocks__/group-ib-fp.ts', '@noble/ed25519': '/node_modules/@noble/ed25519/index.ts', '@noble/hashes/(.*)': '/node_modules/@noble/hashes/src/$1.ts', + '^parse-imports-exports$': '/node_modules/parse-imports-exports/index.cjs', }, }; diff --git a/jest/setup.ts b/jest/setup.ts index fd751d1e767bf..0ee435691f29c 100644 --- a/jest/setup.ts +++ b/jest/setup.ts @@ -1,6 +1,5 @@ /* eslint-disable max-classes-per-file */ // Polyfill necessary for Onyx.init in jest/setupAfterEnv.ts -import '@src/polyfills/PromiseWithResolvers'; import * as core from '@actions/core'; import '@shopify/flash-list/jestSetup'; import type {ReactNode} from 'react'; @@ -13,6 +12,7 @@ import mockStorage from 'react-native-onyx/dist/storage/__mocks__'; import type Animated from 'react-native-reanimated'; import 'setimmediate'; import * as MockedSecureStore from '@src/libs/MultifactorAuthentication/Biometrics/SecureStore/index.web'; +import '@src/polyfills/PromiseWithResolvers'; import mockFSLibrary from './setupMockFullstoryLib'; import setupMockImages from './setupMockImages'; diff --git a/package-lock.json b/package-lock.json index 07d1db9aea69d..9763b583c9733 100644 --- a/package-lock.json +++ b/package-lock.json @@ -197,7 +197,7 @@ "@storybook/react-webpack5": "10.1.10", "@svgr/webpack": "^6.0.0", "@testing-library/react-native": "13.2.0", - "@trivago/prettier-plugin-sort-imports": "5.2.2", + "@trivago/prettier-plugin-sort-imports": "^6.0.2", "@types/base-64": "^1.0.2", "@types/canvas-size": "^1.2.2", "@types/concurrently": "^7.0.0", @@ -16058,25 +16058,28 @@ } }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-5.2.2.tgz", - "integrity": "sha512-fYDQA9e6yTNmA13TLVSA+WMQRc5Bn/c0EUBditUHNfMMxN7M82c38b1kEggVE3pLpZ0FwkwJkUEKMiOi52JXFA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-6.0.2.tgz", + "integrity": "sha512-3DgfkukFyC/sE/VuYjaUUWoFfuVjPK55vOFDsxD56XXynFMCZDYFogH2l/hDfOsQAm1myoU/1xByJ3tWqtulXA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/generator": "^7.26.5", - "@babel/parser": "^7.26.7", - "@babel/traverse": "^7.26.7", - "@babel/types": "^7.26.7", + "@babel/generator": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", "javascript-natural-sort": "^0.7.1", - "lodash": "^4.17.21" + "lodash-es": "^4.17.21", + "minimatch": "^9.0.0", + "parse-imports-exports": "^0.2.4" }, "engines": { - "node": ">18.12" + "node": ">= 20" }, "peerDependencies": { "@vue/compiler-sfc": "3.x", "prettier": "2.x - 3.x", + "prettier-plugin-ember-template-tag": ">= 2.0.0", "prettier-plugin-svelte": "3.x", "svelte": "4.x || 5.x" }, @@ -16084,6 +16087,9 @@ "@vue/compiler-sfc": { "optional": true }, + "prettier-plugin-ember-template-tag": { + "optional": true + }, "prettier-plugin-svelte": { "optional": true }, @@ -16092,6 +16098,32 @@ } } }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", diff --git a/package.json b/package.json index aa8f603aa47a6..a7b6249d5b620 100644 --- a/package.json +++ b/package.json @@ -263,7 +263,7 @@ "@storybook/react-webpack5": "10.1.10", "@svgr/webpack": "^6.0.0", "@testing-library/react-native": "13.2.0", - "@trivago/prettier-plugin-sort-imports": "5.2.2", + "@trivago/prettier-plugin-sort-imports": "^6.0.2", "@types/base-64": "^1.0.2", "@types/canvas-size": "^1.2.2", "@types/concurrently": "^7.0.0", diff --git a/patches/@trivago/prettier-plugin-sort-imports/@trivago+prettier-plugin-sort-imports+6.0.2+001+add-oxc-parser-support.patch b/patches/@trivago/prettier-plugin-sort-imports/@trivago+prettier-plugin-sort-imports+6.0.2+001+add-oxc-parser-support.patch new file mode 100644 index 0000000000000..45e325943a201 --- /dev/null +++ b/patches/@trivago/prettier-plugin-sort-imports/@trivago+prettier-plugin-sort-imports+6.0.2+001+add-oxc-parser-support.patch @@ -0,0 +1,34 @@ +diff --git a/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/index.js b/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/index.js +index d2d7e8d..397aa3b 100644 +--- a/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/index.js ++++ b/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/index.js +@@ -10,6 +10,10 @@ import { createEmberParsers } from './utils/create-ember-parsers.js'; + import { createSvelteParsers } from './utils/create-svelte-parsers.js'; + const emberParsers = await createEmberParsers(); + const svelteParsers = await createSvelteParsers(); ++ ++let oxcParsers = {}; ++try { oxcParsers = (await import('@prettier/plugin-oxc')).parsers; } catch {} ++ + const options = { + importOrderExclude: { + type: 'path', +@@ -122,6 +126,18 @@ export default { + }, + } + : {}), ++ ...(oxcParsers.oxc ++ ? { ++ oxc: { ++ ...oxcParsers.oxc, ++ preprocess: defaultPreprocessor, ++ }, ++ 'oxc-ts': { ++ ...oxcParsers['oxc-ts'], ++ preprocess: defaultPreprocessor, ++ }, ++ } ++ : {}), + }, + options, + }; diff --git a/patches/@trivago/prettier-plugin-sort-imports/details.md b/patches/@trivago/prettier-plugin-sort-imports/details.md new file mode 100644 index 0000000000000..f7f5eb5d84fac --- /dev/null +++ b/patches/@trivago/prettier-plugin-sort-imports/details.md @@ -0,0 +1,17 @@ +# `@trivago/prettier-plugin-sort-imports` patches + +### [@trivago+prettier-plugin-sort-imports+6.0.2+001+add-oxc-parser-support.patch](@trivago+prettier-plugin-sort-imports+6.0.2+001+add-oxc-parser-support.patch) + +- Reason: + + ``` + @prettier/plugin-oxc registers oxc and oxc-ts parsers that override the built-in + babel and typescript parsers for JS/TS files. Since the sort-imports plugin only + attaches its import-sorting preprocess hook to babel/typescript/flow/vue parsers, + import sorting is silently skipped when OXC is active. This patch adds oxc and + oxc-ts parser entries that compose OXC's parser with the sort-imports preprocess hook. + ``` + +- Upstream PR/issue: https://github.com/trivago/prettier-plugin-sort-imports/pull/398 +- E/App issue: https://github.com/Expensify/App/issues/82687 +- PR introducing patch: https://github.com/Expensify/App/pull/83008 diff --git a/src/components/BookTravelButton.tsx b/src/components/BookTravelButton.tsx index 46b05591e0616..1a8abee905570 100644 --- a/src/components/BookTravelButton.tsx +++ b/src/components/BookTravelButton.tsx @@ -20,8 +20,8 @@ import colors from '@styles/theme/colors'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import type WithSentryLabel from '@src/types/utils/SentryLabel'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; +import type WithSentryLabel from '@src/types/utils/SentryLabel'; import Button from './Button'; import ConfirmModal from './ConfirmModal'; import DotIndicatorMessage from './DotIndicatorMessage'; diff --git a/src/components/CardPreview.tsx b/src/components/CardPreview.tsx index 73beb3429feaa..2c95aa385a96d 100644 --- a/src/components/CardPreview.tsx +++ b/src/components/CardPreview.tsx @@ -1,5 +1,5 @@ -import type {StyleProp, ViewStyle} from 'react-native'; import React from 'react'; +import type {StyleProp, ViewStyle} from 'react-native'; import {View} from 'react-native'; import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset'; import useOnyx from '@hooks/useOnyx'; diff --git a/src/components/DelegateNoAccessModalProvider/index.tsx b/src/components/DelegateNoAccessModalProvider/index.tsx index 881d7b10e79dd..e35fff07fd652 100644 --- a/src/components/DelegateNoAccessModalProvider/index.tsx +++ b/src/components/DelegateNoAccessModalProvider/index.tsx @@ -3,14 +3,14 @@ import React, {createContext, useContext, useState} from 'react'; import type {PropsWithChildren} from 'react'; import {View} from 'react-native'; +import ConfirmModal from '@components/ConfirmModal'; +import RenderHTML from '@components/RenderHTML'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import useThemeStyles from '@hooks/useThemeStyles'; import AccountUtils from '@libs/AccountUtils'; import ONYXKEYS from '@src/ONYXKEYS'; -import ConfirmModal from '@components/ConfirmModal'; -import RenderHTML from '@components/RenderHTML'; import {defaultDelegateNoAccessActionsContextValue, defaultDelegateNoAccessStateContextValue} from './default'; import type {DelegateNoAccessActionsContextType, DelegateNoAccessStateContextType} from './types'; diff --git a/src/components/FeatureList.tsx b/src/components/FeatureList.tsx index 224fa9e5e7d47..a97310cdfa6fd 100644 --- a/src/components/FeatureList.tsx +++ b/src/components/FeatureList.tsx @@ -5,9 +5,9 @@ import type {StyleProp, TextStyle, ViewStyle} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import variables from '@styles/variables'; +import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type IconAsset from '@src/types/utils/IconAsset'; -import CONST from '@src/CONST'; import Button from './Button'; import type DotLottieAnimation from './LottieAnimations/types'; import MenuItem from './MenuItem'; diff --git a/src/components/LHNOptionsList/LHNOptionsList.tsx b/src/components/LHNOptionsList/LHNOptionsList.tsx index 56a6abe2930d5..b3ef9fcbfac66 100644 --- a/src/components/LHNOptionsList/LHNOptionsList.tsx +++ b/src/components/LHNOptionsList/LHNOptionsList.tsx @@ -18,8 +18,8 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePrevious from '@hooks/usePrevious'; +import useReportAttributes from '@hooks/useReportAttributes'; import useRootNavigationState from '@hooks/useRootNavigationState'; import useScrollEventEmitter from '@hooks/useScrollEventEmitter'; import useTheme from '@hooks/useTheme'; diff --git a/src/components/MoneyRequestConfirmationListFooter.tsx b/src/components/MoneyRequestConfirmationListFooter.tsx index 6bbe965d4439f..7a82d1785e90c 100644 --- a/src/components/MoneyRequestConfirmationListFooter.tsx +++ b/src/components/MoneyRequestConfirmationListFooter.tsx @@ -12,9 +12,9 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import useOutstandingReports from '@hooks/useOutstandingReports'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import usePrevious from '@hooks/usePrevious'; +import useReportAttributes from '@hooks/useReportAttributes'; import useThemeStyles from '@hooks/useThemeStyles'; import {getDecodedCategoryName} from '@libs/CategoryUtils'; import {convertToDisplayString} from '@libs/CurrencyUtils'; diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx index 0181bb0114ff5..139e6bf33ced0 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx @@ -60,12 +60,12 @@ import markOpenReportEnd from '@libs/telemetry/markOpenReportEnd'; import {isTransactionPendingDelete} from '@libs/TransactionUtils'; import Visibility from '@libs/Visibility'; import isSearchTopmostFullScreenRoute from '@navigation/helpers/isSearchTopmostFullScreenRoute'; -import {ActionListContext} from '@pages/inbox/ReportScreenContext'; import FloatingMessageCounter from '@pages/inbox/report/FloatingMessageCounter'; import getInitialNumToRender from '@pages/inbox/report/getInitialNumReportActionsToRender'; import ReportActionsListItemRenderer from '@pages/inbox/report/ReportActionsListItemRenderer'; import shouldDisplayNewMarkerOnReportAction from '@pages/inbox/report/shouldDisplayNewMarkerOnReportAction'; import useReportUnreadMessageScrollTracking from '@pages/inbox/report/useReportUnreadMessageScrollTracking'; +import {ActionListContext} from '@pages/inbox/ReportScreenContext'; import variables from '@styles/variables'; import {openReport, readNewestAction, subscribeToNewActionEvent} from '@userActions/Report'; import CONST from '@src/CONST'; diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportNavigation.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportNavigation.tsx index 699f026d38795..1267749a019cd 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportNavigation.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportNavigation.tsx @@ -2,11 +2,11 @@ import React, {useEffect} from 'react'; import {View} from 'react-native'; import PrevNextButtons from '@components/PrevNextButtons'; import Text from '@components/Text'; +import useActionLoadingReportIDs from '@hooks/useActionLoadingReportIDs'; import useArchivedReportsIdSet from '@hooks/useArchivedReportsIdSet'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; -import useActionLoadingReportIDs from '@hooks/useActionLoadingReportIDs'; import useThemeStyles from '@hooks/useThemeStyles'; import {selectFilteredReportActions} from '@libs/ReportUtils'; import {getSections, getSortedSections} from '@libs/SearchUIUtils'; diff --git a/src/components/MultifactorAuthentication/Context/stateReducer.ts b/src/components/MultifactorAuthentication/Context/stateReducer.ts index b420d39bc69a6..9d21ceb034267 100644 --- a/src/components/MultifactorAuthentication/Context/stateReducer.ts +++ b/src/components/MultifactorAuthentication/Context/stateReducer.ts @@ -1,5 +1,5 @@ -import CONST from '@src/CONST'; import {MULTIFACTOR_AUTHENTICATION_SCENARIO_CONFIG} from '@components/MultifactorAuthentication/config'; +import CONST from '@src/CONST'; import type {Action, MultifactorAuthenticationState} from './types'; const DEFAULT_STATE: MultifactorAuthenticationState = { diff --git a/src/components/MultifactorAuthentication/components/AuthenticationMethodDescription.tsx b/src/components/MultifactorAuthentication/components/AuthenticationMethodDescription.tsx index 3392acddaedf2..05d0909d709d3 100644 --- a/src/components/MultifactorAuthentication/components/AuthenticationMethodDescription.tsx +++ b/src/components/MultifactorAuthentication/components/AuthenticationMethodDescription.tsx @@ -3,9 +3,9 @@ import {useMultifactorAuthenticationState} from '@components/MultifactorAuthenti import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import {SECURE_STORE_VALUES} from '@libs/MultifactorAuthentication/Biometrics/SecureStore'; import type {AuthTypeName} from '@libs/MultifactorAuthentication/Biometrics/types'; import type {TranslationPaths} from '@src/languages/types'; -import {SECURE_STORE_VALUES} from '@libs/MultifactorAuthentication/Biometrics/SecureStore'; /* eslint-disable @typescript-eslint/naming-convention */ const AUTH_TYPE_TRANSLATION_KEY = { diff --git a/src/components/Navigation/NavigationTabBar/SearchTabButton.tsx b/src/components/Navigation/NavigationTabBar/SearchTabButton.tsx index 9fba0ebe32b0b..a430c4cc36693 100644 --- a/src/components/Navigation/NavigationTabBar/SearchTabButton.tsx +++ b/src/components/Navigation/NavigationTabBar/SearchTabButton.tsx @@ -4,9 +4,9 @@ import type {ValueOf} from 'type-fest'; import Icon from '@components/Icon'; import {PressableWithFeedback} from '@components/Pressable'; import Text from '@components/Text'; +import useDefaultSearchQuery from '@hooks/useDefaultSearchQuery'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; -import useDefaultSearchQuery from '@hooks/useDefaultSearchQuery'; import useOnyx from '@hooks/useOnyx'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/components/Navigation/NavigationTabBar/WorkspacesTabButton.tsx b/src/components/Navigation/NavigationTabBar/WorkspacesTabButton.tsx index 54ea0b7269bf1..44a1fb86e7acf 100644 --- a/src/components/Navigation/NavigationTabBar/WorkspacesTabButton.tsx +++ b/src/components/Navigation/NavigationTabBar/WorkspacesTabButton.tsx @@ -15,11 +15,11 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import useWorkspacesTabIndicatorStatus from '@hooks/useWorkspacesTabIndicatorStatus'; import navigateToWorkspacesPage, {getWorkspaceNavigationRouteState} from '@libs/Navigation/helpers/navigateToWorkspacesPage'; +import type {DomainSplitNavigatorParamList, WorkspaceSplitNavigatorParamList} from '@navigation/types'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import NAVIGATORS from '@src/NAVIGATORS'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {DomainSplitNavigatorParamList, WorkspaceSplitNavigatorParamList} from '@navigation/types'; import type SCREENS from '@src/SCREENS'; import type {Domain, Policy} from '@src/types/onyx'; import getTabIconFill from './getTabIconFill'; diff --git a/src/components/ReportActionItem/MoneyRequestReceiptView.tsx b/src/components/ReportActionItem/MoneyRequestReceiptView.tsx index ef9edc6e7830e..062b389524a14 100644 --- a/src/components/ReportActionItem/MoneyRequestReceiptView.tsx +++ b/src/components/ReportActionItem/MoneyRequestReceiptView.tsx @@ -3,22 +3,25 @@ import React, {useMemo, useState} from 'react'; import {View} from 'react-native'; import type {StyleProp, ViewStyle} from 'react-native'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; -import {ModalActions} from '@components/Modal/Global/ModalContext'; import type {ValueOf} from 'type-fest'; +import {ModalActions} from '@components/Modal/Global/ModalContext'; import OfflineWithFeedback from '@components/OfflineWithFeedback'; import ReceiptAudit, {ReceiptAuditMessages} from '@components/ReceiptAudit'; import ReceiptEmptyState from '@components/ReceiptEmptyState'; import useActiveRoute from '@hooks/useActiveRoute'; +import useCardFeedErrors from '@hooks/useCardFeedErrors'; import useConfirmModal from '@hooks/useConfirmModal'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useEnvironment from '@hooks/useEnvironment'; import useGetIOUReportFromReportAction from '@hooks/useGetIOUReportFromReportAction'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; +import useOriginalReportID from '@hooks/useOriginalReportID'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import useTransactionViolations from '@hooks/useTransactionViolations'; +import {getBrokenConnectionUrlToFixPersonalCard} from '@libs/CardUtils'; import {getMicroSecondOnyxErrorWithTranslationKey, isReceiptError} from '@libs/ErrorUtils'; import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; import {getThumbnailAndImageURIs} from '@libs/ReceiptUtils'; @@ -53,9 +56,6 @@ import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; import type {TransactionPendingFieldsKey} from '@src/types/onyx/Transaction'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import useOriginalReportID from '@hooks/useOriginalReportID'; -import useCardFeedErrors from '@hooks/useCardFeedErrors'; -import {getBrokenConnectionUrlToFixPersonalCard} from '@libs/CardUtils'; import ReportActionItemImage from './ReportActionItemImage'; type MoneyRequestReceiptViewProps = { diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 51e56b83f9ff3..2b5dda9f3e3d5 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -15,6 +15,7 @@ import Text from '@components/Text'; import ViolationMessages from '@components/ViolationMessages'; import {useWideRHPState} from '@components/WideRHPContextProvider'; import useActiveRoute from '@hooks/useActiveRoute'; +import useCardFeedErrors from '@hooks/useCardFeedErrors'; import {useCurrencyListActions} from '@hooks/useCurrencyList'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useEnvironment from '@hooks/useEnvironment'; @@ -23,9 +24,9 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import usePrevious from '@hooks/usePrevious'; +import useReportAttributes from '@hooks/useReportAttributes'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useStyleUtils from '@hooks/useStyleUtils'; @@ -44,7 +45,6 @@ import DistanceRequestUtils from '@libs/DistanceRequestUtils'; import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; import {getRateFromMerchant} from '@libs/MergeTransactionUtils'; import {hasEnabledOptions} from '@libs/OptionsListUtils'; -import useCardFeedErrors from '@hooks/useCardFeedErrors'; import Parser from '@libs/Parser'; import { canSubmitPerDiemExpenseFromWorkspace, diff --git a/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx b/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx index 8f373b8bfe3bb..5d67878aad01e 100644 --- a/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx +++ b/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx @@ -11,6 +11,7 @@ import ReportActionItemImages from '@components/ReportActionItem/ReportActionIte import UserInfoCellsWithArrow from '@components/SelectionListWithSections/Search/UserInfoCellsWithArrow'; import Text from '@components/Text'; import TransactionPreviewSkeletonView from '@components/TransactionPreviewSkeletonView'; +import useCardFeedErrors from '@hooks/useCardFeedErrors'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useEnvironment from '@hooks/useEnvironment'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; @@ -19,6 +20,7 @@ import useOnyx from '@hooks/useOnyx'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; +import {getBrokenConnectionUrlToFixPersonalCard} from '@libs/CardUtils'; import {getDecodedCategoryName} from '@libs/CategoryUtils'; import {convertToDisplayString} from '@libs/CurrencyUtils'; import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; @@ -39,8 +41,6 @@ import variables from '@styles/variables'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import useCardFeedErrors from '@hooks/useCardFeedErrors'; -import {getBrokenConnectionUrlToFixPersonalCard} from '@libs/CardUtils'; import type {TransactionPreviewContentProps} from './types'; function TransactionPreviewContent({ diff --git a/src/components/Search/SearchAutocompleteList.tsx b/src/components/Search/SearchAutocompleteList.tsx index 9777e67ee7780..1801fe3c9d6e4 100644 --- a/src/components/Search/SearchAutocompleteList.tsx +++ b/src/components/Search/SearchAutocompleteList.tsx @@ -14,8 +14,8 @@ import type {SearchQueryItem, SearchQueryListItemProps} from '@components/Select import SearchQueryListItem, {isSearchQueryItem} from '@components/SelectionListWithSections/Search/SearchQueryListItem'; import {useCurrencyListState} from '@hooks/useCurrencyList'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; -import useFeedKeysWithAssignedCards from '@hooks/useFeedKeysWithAssignedCards'; import useDebounce from '@hooks/useDebounce'; +import useFeedKeysWithAssignedCards from '@hooks/useFeedKeysWithAssignedCards'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; diff --git a/src/components/Search/SearchChartView.tsx b/src/components/Search/SearchChartView.tsx index 79ffb2a3e04b3..562c20e6c0ddf 100644 --- a/src/components/Search/SearchChartView.tsx +++ b/src/components/Search/SearchChartView.tsx @@ -15,6 +15,7 @@ import type { TransactionYearGroupListItemType, } from '@components/SelectionListWithSections/types'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; +import useLocalize from '@hooks/useLocalize'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import DateUtils from '@libs/DateUtils'; @@ -24,7 +25,6 @@ import {formatToParts} from '@libs/NumberFormatUtils'; import {buildSearchQueryJSON, buildSearchQueryString} from '@libs/SearchQueryUtils'; import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; -import useLocalize from '@hooks/useLocalize'; import SearchBarChart from './SearchBarChart'; import SearchLineChart from './SearchLineChart'; import type {ChartView, GroupedItem, SearchGroupBy, SearchQueryJSON} from './types'; diff --git a/src/components/VideoPlayer/BaseVideoPlayer.tsx b/src/components/VideoPlayer/BaseVideoPlayer.tsx index 4d27bd8089ca6..f7723bd055d73 100644 --- a/src/components/VideoPlayer/BaseVideoPlayer.tsx +++ b/src/components/VideoPlayer/BaseVideoPlayer.tsx @@ -9,8 +9,8 @@ import {View} from 'react-native'; import {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; import {scheduleOnRN} from 'react-native-worklets'; import AttachmentOfflineIndicator from '@components/AttachmentOfflineIndicator'; -import LoadingIndicator from '@components/LoadingIndicator'; import Hoverable from '@components/Hoverable'; +import LoadingIndicator from '@components/LoadingIndicator'; import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; import {useFullScreenContext} from '@components/VideoPlayerContexts/FullScreenContext'; import {usePlaybackActionsContext, usePlaybackStateContext} from '@components/VideoPlayerContexts/PlaybackContext'; diff --git a/src/hooks/useDefaultSearchQuery.ts b/src/hooks/useDefaultSearchQuery.ts index 5d58793dca9f8..aaca529b73d67 100644 --- a/src/hooks/useDefaultSearchQuery.ts +++ b/src/hooks/useDefaultSearchQuery.ts @@ -1,7 +1,7 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import {isPaidGroupPolicy} from '@libs/PolicyUtils'; -import {isEligibleForApproveSuggestion} from '@libs/SearchUIUtils'; import {buildCannedSearchQuery, buildQueryStringFromFilterFormValues} from '@libs/SearchQueryUtils'; +import {isEligibleForApproveSuggestion} from '@libs/SearchUIUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Policy, Session} from '@src/types/onyx'; diff --git a/src/hooks/useOutstandingReports.ts b/src/hooks/useOutstandingReports.ts index 5dd4d04b0551f..7b45c4291de57 100644 --- a/src/hooks/useOutstandingReports.ts +++ b/src/hooks/useOutstandingReports.ts @@ -4,8 +4,8 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Policy} from '@src/types/onyx'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -import useOnyx from './useOnyx'; import useMappedPolicies from './useMappedPolicies'; +import useOnyx from './useOnyx'; const policyIdMapper = (policy: OnyxEntry) => policy?.id; diff --git a/src/hooks/useReceiptScanDrop.tsx b/src/hooks/useReceiptScanDrop.tsx index 9b1a57248f930..e35d2e850f1cf 100644 --- a/src/hooks/useReceiptScanDrop.tsx +++ b/src/hooks/useReceiptScanDrop.tsx @@ -1,18 +1,18 @@ import {useMemo} from 'react'; +import {setTransactionReport} from '@libs/actions/Transaction'; import {navigateToParticipantPage} from '@libs/IOUUtils'; import Navigation from '@libs/Navigation/Navigation'; import {hasOnlyPersonalPolicies as hasOnlyPersonalPoliciesUtil, isPaidGroupPolicy} from '@libs/PolicyUtils'; import {generateReportID, getPolicyExpenseChat, isSelfDM} from '@libs/ReportUtils'; import {shouldRestrictUserBillableActions} from '@libs/SubscriptionUtils'; -import {setTransactionReport} from '@libs/actions/Transaction'; import type {ReceiptFile} from '@pages/iou/request/step/IOURequestStepScan/types'; +import {initMoneyRequest, setMoneyRequestParticipantsFromReport, setMoneyRequestReceipt} from '@userActions/IOU'; +import {buildOptimisticTransactionAndCreateDraft} from '@userActions/TransactionEdit'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Transaction} from '@src/types/onyx'; import type {FileObject} from '@src/types/utils/Attachment'; -import {initMoneyRequest, setMoneyRequestParticipantsFromReport, setMoneyRequestReceipt} from '@userActions/IOU'; -import {buildOptimisticTransactionAndCreateDraft} from '@userActions/TransactionEdit'; import useCurrentUserPersonalDetails from './useCurrentUserPersonalDetails'; import useFilesValidation from './useFilesValidation'; import useOnyx from './useOnyx'; diff --git a/src/hooks/useSearchTypeMenuSections.ts b/src/hooks/useSearchTypeMenuSections.ts index fa47ebe201d12..ecee098c1133f 100644 --- a/src/hooks/useSearchTypeMenuSections.ts +++ b/src/hooks/useSearchTypeMenuSections.ts @@ -9,9 +9,9 @@ import useCardFeedsForDisplay from './useCardFeedsForDisplay'; import useCreateEmptyReportConfirmation from './useCreateEmptyReportConfirmation'; import {useMemoizedLazyExpensifyIcons} from './useLazyAsset'; import useLocalize from './useLocalize'; +import useMappedPolicies from './useMappedPolicies'; import useNetwork from './useNetwork'; import useOnyx from './useOnyx'; -import useMappedPolicies from './useMappedPolicies'; const policyMapper = (policy: OnyxEntry): OnyxEntry => policy && { diff --git a/src/hooks/useSidebarOrderedReports.tsx b/src/hooks/useSidebarOrderedReports.tsx index 64ccd2d1deb34..b64bef834e20f 100644 --- a/src/hooks/useSidebarOrderedReports.tsx +++ b/src/hooks/useSidebarOrderedReports.tsx @@ -11,8 +11,8 @@ import {useCurrentReportIDState} from './useCurrentReportID'; import useCurrentUserPersonalDetails from './useCurrentUserPersonalDetails'; import useDeepCompareRef from './useDeepCompareRef'; import useLocalize from './useLocalize'; -import useOnyx from './useOnyx'; import useMappedPolicies from './useMappedPolicies'; +import useOnyx from './useOnyx'; import usePrevious from './usePrevious'; import useReportAttributes from './useReportAttributes'; import useResponsiveLayout from './useResponsiveLayout'; diff --git a/src/languages/de.ts b/src/languages/de.ts index b4f1403031081..4a03ff9d96182 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 809aa73933c76..1649032ccebfc 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/it.ts b/src/languages/it.ts index ebba8e0b93761..ab5d3ad3d3de1 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/ja.ts b/src/languages/ja.ts index f9942a74e38fd..aef166dc03186 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 95d7cd4f6b03f..ed684dd2c1a20 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 59a3b8858ba3f..c3fb46eed1002 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index cb056498d33f3..e8a9706e56bef 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index de176b57f9101..b0b20fa42a589 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -131,6 +131,7 @@ import type { ZipCodeExampleFormatParams, } from './params'; import type {TranslationDeepObject} from './types'; + type StateValue = { stateISO: string; stateName: string; diff --git a/src/libs/CardFeedUtils.ts b/src/libs/CardFeedUtils.ts index 91c2ee93c69c4..d1847aa2a03c2 100644 --- a/src/libs/CardFeedUtils.ts +++ b/src/libs/CardFeedUtils.ts @@ -1,7 +1,7 @@ -import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import type {OnyxCollection} from 'react-native-onyx'; import type {LocaleContextProps, LocalizedTranslate} from '@components/LocaleContextProvider'; import type {AdditionalCardProps} from '@components/SelectionListWithSections/Search/CardListItem'; +import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import type IllustrationsType from '@styles/theme/illustrations/types'; import CONST from '@src/CONST'; import type {CombinedCardFeeds} from '@src/hooks/useCardFeeds'; diff --git a/src/libs/CardUtils.ts b/src/libs/CardUtils.ts index 49e3918ed1735..a8d8765d08fd5 100644 --- a/src/libs/CardUtils.ts +++ b/src/libs/CardUtils.ts @@ -1,4 +1,3 @@ -import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import {fromUnixTime, isBefore} from 'date-fns'; import groupBy from 'lodash/groupBy'; import lodashSortBy from 'lodash/sortBy'; @@ -6,11 +5,13 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import type {TupleToUnion, ValueOf} from 'type-fest'; import type {LocaleContextProps, LocalizedTranslate} from '@components/LocaleContextProvider'; import type {CombinedCardFeed, CombinedCardFeeds} from '@hooks/useCardFeeds'; +import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import type IllustrationsType from '@styles/theme/illustrations/types'; import * as Illustrations from '@src/components/Icon/Illustrations'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import type { BankAccountList, Card, @@ -24,7 +25,6 @@ import type { PrivatePersonalDetails, WorkspaceCardsList, } from '@src/types/onyx'; -import ROUTES from '@src/ROUTES'; import type {UnassignedCard} from '@src/types/onyx/Card'; import type { BankName, diff --git a/src/libs/Navigation/helpers/getAdaptedStateFromPath.ts b/src/libs/Navigation/helpers/getAdaptedStateFromPath.ts index 5385d2b3d7822..52377a9f13262 100644 --- a/src/libs/Navigation/helpers/getAdaptedStateFromPath.ts +++ b/src/libs/Navigation/helpers/getAdaptedStateFromPath.ts @@ -1,16 +1,16 @@ +import type {NavigationState, PartialState, getStateFromPath as RNGetStateFromPath, Route} from '@react-navigation/native'; +import {findFocusedRoute} from '@react-navigation/native'; +import pick from 'lodash/pick'; import getInitialSplitNavigatorState from '@libs/Navigation/AppNavigator/createSplitNavigator/getInitialSplitNavigatorState'; import {RHP_TO_DOMAIN, RHP_TO_HOME, RHP_TO_SEARCH, RHP_TO_SETTINGS, RHP_TO_SIDEBAR, RHP_TO_WORKSPACE, RHP_TO_WORKSPACES_LIST} from '@libs/Navigation/linkingConfig/RELATIONS'; import type {NavigationPartialRoute, RootNavigatorParamList} from '@libs/Navigation/types'; import {getReportOrDraftReport} from '@libs/ReportUtils'; import {getSearchParamFromPath} from '@libs/Url'; -import type {NavigationState, PartialState, getStateFromPath as RNGetStateFromPath, Route} from '@react-navigation/native'; -import {findFocusedRoute} from '@react-navigation/native'; import CONST from '@src/CONST'; import NAVIGATORS from '@src/NAVIGATORS'; import type {Route as RoutePath} from '@src/ROUTES'; import ROUTES from '@src/ROUTES'; import SCREENS from '@src/SCREENS'; -import pick from 'lodash/pick'; import getLastSuffixFromPath from './getLastSuffixFromPath'; import getMatchingNewRoute from './getMatchingNewRoute'; import getParamsFromRoute from './getParamsFromRoute'; diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index e876f77d4292f..5a5bf56c67551 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -8,6 +8,7 @@ import Onyx from 'react-native-onyx'; import type {SetNonNullable} from 'type-fest'; import {FallbackAvatar} from '@components/Icon/Expensicons'; import type {LocaleContextProps, LocalizedTranslate} from '@components/LocaleContextProvider'; +import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import {getEnabledCategoriesCount} from '@libs/CategoryUtils'; import filterArrayByMatch from '@libs/filterArrayByMatch'; import {isReportMessageAttachment} from '@libs/isReportMessageAttachment'; @@ -149,7 +150,6 @@ import {isScanning} from '@libs/TransactionUtils'; import {generateAccountID} from '@libs/UserUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import type { Beta, DismissedProductTraining, diff --git a/src/libs/SearchQueryUtils.ts b/src/libs/SearchQueryUtils.ts index 743784a641fa0..9e143fbef6aae 100644 --- a/src/libs/SearchQueryUtils.ts +++ b/src/libs/SearchQueryUtils.ts @@ -1,4 +1,3 @@ -import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import cloneDeep from 'lodash/cloneDeep'; import type {OnyxCollection} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; @@ -22,6 +21,7 @@ import type { UserFriendlyKey, UserFriendlyValue, } from '@components/Search/types'; +import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import CONST from '@src/CONST'; import NAVIGATORS from '@src/NAVIGATORS'; import type {OnyxCollectionKey, OnyxCollectionValuesMapping} from '@src/ONYXKEYS'; diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index a821c10afd8d9..50df8490b6dc2 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -1,6 +1,5 @@ /* eslint-disable max-lines */ // TODO: Remove this disable once SearchUIUtils is refactored (see dedicated refactor issue) -import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import {addDays, endOfMonth, format, parse, startOfMonth, startOfYear, subDays, subMonths} from 'date-fns'; import type {TextStyle, ViewStyle} from 'react-native'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; @@ -55,6 +54,7 @@ import type { TransactionWithdrawalIDGroupListItemType, TransactionYearGroupListItemType, } from '@components/SelectionListWithSections/types'; +import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import type {ThemeColors} from '@styles/theme/types'; import * as Expensicons from '@src/components/Icon/Expensicons'; import CONST from '@src/CONST'; diff --git a/src/libs/telemetry/integrations/index.ts b/src/libs/telemetry/integrations/index.ts index 9787bab6da11d..6853608ce06aa 100644 --- a/src/libs/telemetry/integrations/index.ts +++ b/src/libs/telemetry/integrations/index.ts @@ -1,5 +1,5 @@ import * as Sentry from '@sentry/react-native'; -import {browserProfilingIntegration, navigationIntegration, shouldCreateSpanForRequest, breadcrumbsIntegration, consoleIntegration} from './common'; +import {breadcrumbsIntegration, browserProfilingIntegration, consoleIntegration, navigationIntegration, shouldCreateSpanForRequest} from './common'; const tracingIntegration = Sentry.reactNativeTracingIntegration({ shouldCreateSpanForRequest, diff --git a/src/libs/telemetry/integrations/index.web.ts b/src/libs/telemetry/integrations/index.web.ts index ed0058dbba312..3de3e11e076e3 100644 --- a/src/libs/telemetry/integrations/index.web.ts +++ b/src/libs/telemetry/integrations/index.web.ts @@ -1,5 +1,5 @@ import * as SentryReact from '@sentry/react'; -import {browserProfilingIntegration, navigationIntegration, shouldCreateSpanForRequest, breadcrumbsIntegration, consoleIntegration} from './common'; +import {breadcrumbsIntegration, browserProfilingIntegration, consoleIntegration, navigationIntegration, shouldCreateSpanForRequest} from './common'; /** * Browser tracing integration is enabled on Web to support web health measurements diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index ce32a79fcb54f..4a164662a6ea6 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -35,9 +35,9 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePaginatedReportActions from '@hooks/usePaginatedReportActions'; -import useReportAttributes from '@hooks/useReportAttributes'; import useParentReportAction from '@hooks/useParentReportAction'; import usePreferredPolicy from '@hooks/usePreferredPolicy'; +import useReportAttributes from '@hooks/useReportAttributes'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/Share/SubmitDetailsPage.tsx b/src/pages/Share/SubmitDetailsPage.tsx index 90df6dc45b859..08d61bbdd1caf 100644 --- a/src/pages/Share/SubmitDetailsPage.tsx +++ b/src/pages/Share/SubmitDetailsPage.tsx @@ -12,9 +12,9 @@ import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails' import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePrivateIsArchivedMap from '@hooks/usePrivateIsArchivedMap'; +import useReportAttributes from '@hooks/useReportAttributes'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useThemeStyles from '@hooks/useThemeStyles'; import type {GpsPoint} from '@libs/actions/IOU'; diff --git a/src/pages/domain/Members/DomainMemberVacationDelegatePage.tsx b/src/pages/domain/Members/DomainMemberVacationDelegatePage.tsx index fd1d08dc8d9c0..28f3c6063d62e 100644 --- a/src/pages/domain/Members/DomainMemberVacationDelegatePage.tsx +++ b/src/pages/domain/Members/DomainMemberVacationDelegatePage.tsx @@ -1,20 +1,20 @@ +import {vacationDelegateSelector} from '@selectors/Domain'; +import {personalDetailsSelector} from '@selectors/PersonalDetails'; import React from 'react'; import BaseVacationDelegateSelectionComponent from '@components/BaseVacationDelegateSelectionComponent'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; +import useOnyx from '@hooks/useOnyx'; import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackScreenProps} from '@navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import DomainNotFoundPageWrapper from '@pages/domain/DomainNotFoundPageWrapper'; import {deleteDomainVacationDelegate, setDomainVacationDelegate} from '@userActions/Domain'; import {getCurrentUserEmail} from '@userActions/IOU'; +import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {Participant} from '@src/types/onyx/IOU'; -import useOnyx from '@hooks/useOnyx'; -import ONYXKEYS from '@src/ONYXKEYS'; -import {personalDetailsSelector} from '@selectors/PersonalDetails'; -import {vacationDelegateSelector} from '@selectors/Domain'; type DomainMemberVacationDelegatePageProps = PlatformStackScreenProps; diff --git a/src/pages/inbox/report/PureReportActionItem.tsx b/src/pages/inbox/report/PureReportActionItem.tsx index 0d3d66e68a6fe..47a02fda5009c 100644 --- a/src/pages/inbox/report/PureReportActionItem.tsx +++ b/src/pages/inbox/report/PureReportActionItem.tsx @@ -54,6 +54,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import {cleanUpMoneyRequest} from '@libs/actions/IOU'; import {resolveSuggestedFollowup} from '@libs/actions/Report/SuggestedFollowup'; +import {isPersonalCardBrokenConnection} from '@libs/CardUtils'; import ControlSelection from '@libs/ControlSelection'; import {convertToDisplayString} from '@libs/CurrencyUtils'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; @@ -242,7 +243,6 @@ import type * as OnyxTypes from '@src/types/onyx'; import type {Errors} from '@src/types/onyx/OnyxCommon'; import type {JoinWorkspaceResolution, OriginalMessageMovedTransaction, OriginalMessageUnreportedTransaction} from '@src/types/onyx/OriginalMessage'; import {isEmptyObject, isEmptyValueObject} from '@src/types/utils/EmptyObject'; -import {isPersonalCardBrokenConnection} from '@libs/CardUtils'; import {RestrictedReadOnlyContextMenuActions} from './ContextMenu/ContextMenuActions'; import MiniReportActionContextMenu from './ContextMenu/MiniReportActionContextMenu'; import type {ContextMenuAnchor} from './ContextMenu/ReportActionContextMenu'; diff --git a/src/pages/inbox/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx b/src/pages/inbox/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx index 363a7b2cbfa95..2be0258993988 100644 --- a/src/pages/inbox/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx +++ b/src/pages/inbox/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx @@ -15,6 +15,7 @@ import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import Tooltip from '@components/Tooltip/PopoverAnchorTooltip'; import useCreateEmptyReportConfirmation from '@hooks/useCreateEmptyReportConfirmation'; import useEnvironment from '@hooks/useEnvironment'; +import useHasEmptyReportsForPolicy from '@hooks/useHasEmptyReportsForPolicy'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; @@ -22,7 +23,6 @@ import usePermissions from '@hooks/usePermissions'; import usePopoverPosition from '@hooks/usePopoverPosition'; import usePreferredPolicy from '@hooks/usePreferredPolicy'; import usePrevious from '@hooks/usePrevious'; -import useHasEmptyReportsForPolicy from '@hooks/useHasEmptyReportsForPolicy'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useTheme from '@hooks/useTheme'; diff --git a/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx b/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx index 0faa9d023b0f4..dfa3cbf591de8 100644 --- a/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx +++ b/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx @@ -20,10 +20,10 @@ import useHasEmptyReportsForPolicy from '@hooks/useHasEmptyReportsForPolicy'; import useIsPaidPolicyAdmin from '@hooks/useIsPaidPolicyAdmin'; import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; +import useMappedPolicies from '@hooks/useMappedPolicies'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useMappedPolicies from '@hooks/useMappedPolicies'; import usePreferredPolicy from '@hooks/usePreferredPolicy'; import usePrevious from '@hooks/usePrevious'; import useReportIsArchived from '@hooks/useReportIsArchived'; diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index 9a3dd8d21b529..db309d5330cd0 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -1,4 +1,3 @@ -import useTransactionDraftValues from '@hooks/useTransactionDraftValues'; import {deepEqual} from 'fast-equals'; import lodashPick from 'lodash/pick'; import React, {memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; @@ -29,6 +28,7 @@ import useReportAttributes from '@hooks/useReportAttributes'; import useScreenWrapperTransitionStatus from '@hooks/useScreenWrapperTransitionStatus'; import useSearchSelector from '@hooks/useSearchSelector'; import useThemeStyles from '@hooks/useThemeStyles'; +import useTransactionDraftValues from '@hooks/useTransactionDraftValues'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import getPlatform from '@libs/getPlatform'; import goToSettings from '@libs/goToSettings'; diff --git a/src/pages/iou/request/step/IOURequestStepAmount.tsx b/src/pages/iou/request/step/IOURequestStepAmount.tsx index 98567a376da5e..58e25c0c8f414 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.tsx +++ b/src/pages/iou/request/step/IOURequestStepAmount.tsx @@ -11,10 +11,10 @@ import useDuplicateTransactionsAndViolations from '@hooks/useDuplicateTransactio import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import usePrivateIsArchivedMap from '@hooks/usePrivateIsArchivedMap'; +import useReportAttributes from '@hooks/useReportAttributes'; import useReportIsArchived from '@hooks/useReportIsArchived'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useShowNotFoundPageInIOUStep from '@hooks/useShowNotFoundPageInIOUStep'; diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx index 57659881545c4..959f05a4f9af8 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx @@ -22,12 +22,12 @@ import useNetwork from '@hooks/useNetwork'; import useOnboardingTaskInformation from '@hooks/useOnboardingTaskInformation'; import useOnyx from '@hooks/useOnyx'; import useOptimisticDraftTransactions from '@hooks/useOptimisticDraftTransactions'; -import useReportAttributes from '@hooks/useReportAttributes'; import useParentReportAction from '@hooks/useParentReportAction'; import useParticipantsInvoiceReport from '@hooks/useParticipantsInvoiceReport'; import usePermissions from '@hooks/usePermissions'; import usePolicyForTransaction from '@hooks/usePolicyForTransaction'; import usePrivateIsArchivedMap from '@hooks/usePrivateIsArchivedMap'; +import useReportAttributes from '@hooks/useReportAttributes'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import {completeTestDriveTask} from '@libs/actions/Task'; diff --git a/src/pages/iou/request/step/IOURequestStepDistance.tsx b/src/pages/iou/request/step/IOURequestStepDistance.tsx index 876b26e70455f..218ac56c6c52a 100644 --- a/src/pages/iou/request/step/IOURequestStepDistance.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistance.tsx @@ -19,11 +19,11 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import usePrevious from '@hooks/usePrevious'; +import useReportAttributes from '@hooks/useReportAttributes'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useShowNotFoundPageInIOUStep from '@hooks/useShowNotFoundPageInIOUStep'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/iou/request/step/IOURequestStepDistanceGPS/index.native.tsx b/src/pages/iou/request/step/IOURequestStepDistanceGPS/index.native.tsx index 9d59509037a5a..d1a0b710bc2db 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceGPS/index.native.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistanceGPS/index.native.tsx @@ -6,10 +6,10 @@ import useDefaultExpensePolicy from '@hooks/useDefaultExpensePolicy'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; +import useReportAttributes from '@hooks/useReportAttributes'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useShowNotFoundPageInIOUStep from '@hooks/useShowNotFoundPageInIOUStep'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx b/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx index 7fe39c1264bfd..77a93711502e7 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx @@ -13,9 +13,9 @@ import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; +import useReportAttributes from '@hooks/useReportAttributes'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/iou/request/step/IOURequestStepDistanceMap.tsx b/src/pages/iou/request/step/IOURequestStepDistanceMap.tsx index cdcd111e5eefb..0d5aa7028b8e6 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceMap.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistanceMap.tsx @@ -20,10 +20,10 @@ import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import usePrevious from '@hooks/usePrevious'; +import useReportAttributes from '@hooks/useReportAttributes'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useShowNotFoundPageInIOUStep from '@hooks/useShowNotFoundPageInIOUStep'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx b/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx index 9287d20bab22e..5362bc5c58710 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx @@ -15,9 +15,9 @@ import useDefaultExpensePolicy from '@hooks/useDefaultExpensePolicy'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; -import useReportAttributes from '@hooks/useReportAttributes'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; +import useReportAttributes from '@hooks/useReportAttributes'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useStyleUtils from '@hooks/useStyleUtils'; diff --git a/src/pages/iou/request/step/IOURequestStepParticipants.tsx b/src/pages/iou/request/step/IOURequestStepParticipants.tsx index 99da565eebbd5..326ff6bba17b0 100644 --- a/src/pages/iou/request/step/IOURequestStepParticipants.tsx +++ b/src/pages/iou/request/step/IOURequestStepParticipants.tsx @@ -4,9 +4,9 @@ import type {OnyxEntry} from 'react-native-onyx'; import FormHelpMessage from '@components/FormHelpMessage'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; +import useMappedPolicies from '@hooks/useMappedPolicies'; import useOnyx from '@hooks/useOnyx'; import useOptimisticDraftTransactions from '@hooks/useOptimisticDraftTransactions'; -import useMappedPolicies from '@hooks/useMappedPolicies'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; import useThemeStyles from '@hooks/useThemeStyles'; import {setTransactionReport} from '@libs/actions/Transaction'; diff --git a/src/pages/iou/request/step/IOURequestStepScan/ReceiptPreviews/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/ReceiptPreviews/index.tsx index 9bc1ae92bdc0a..9c6d91594e91d 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/ReceiptPreviews/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/ReceiptPreviews/index.tsx @@ -1,4 +1,3 @@ -import useTransactionDraftReceipts from '@hooks/useTransactionDraftReceipts'; import React, {useEffect, useRef} from 'react'; import {View} from 'react-native'; import type {FlatList as FlatListType} from 'react-native'; @@ -12,6 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import usePrevious from '@hooks/usePrevious'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; +import useTransactionDraftReceipts from '@hooks/useTransactionDraftReceipts'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Navigation from '@libs/Navigation/Navigation'; import CONST from '@src/CONST'; diff --git a/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx index b6e59fa1bb98a..008bad9e8c1b7 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx @@ -1,10 +1,9 @@ -import useTransactionDraftReceipts from '@hooks/useTransactionDraftReceipts'; import React, {useCallback, useEffect, useState} from 'react'; import {InteractionManager} from 'react-native'; import AttachmentCarouselView from '@components/Attachments/AttachmentCarousel/AttachmentCarouselView'; -import type {Attachment} from '@components/Attachments/types'; import useCarouselArrows from '@components/Attachments/AttachmentCarousel/useCarouselArrows'; import useAttachmentErrors from '@components/Attachments/AttachmentView/useAttachmentErrors'; +import type {Attachment} from '@components/Attachments/types'; import Button from '@components/Button'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import {ModalActions} from '@components/Modal/Global/ModalContext'; @@ -14,10 +13,11 @@ import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; import useThemeStyles from '@hooks/useThemeStyles'; -import ONYXKEYS from '@src/ONYXKEYS'; +import useTransactionDraftReceipts from '@hooks/useTransactionDraftReceipts'; import Navigation from '@libs/Navigation/Navigation'; import {removeDraftTransaction, removeTransactionReceipt, replaceDefaultDraftTransaction} from '@userActions/TransactionEdit'; import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import type {Route} from '@src/ROUTES'; type ReceiptViewProps = { diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx index 45e96ec3a345f..beb3496690a94 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx @@ -27,12 +27,12 @@ import useFilesValidation from '@hooks/useFilesValidation'; import useIOUUtils from '@hooks/useIOUUtils'; import {useMemoizedLazyExpensifyIcons, useMemoizedLazyIllustrations} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; -import useReportAttributes from '@hooks/useReportAttributes'; import useOnyx from '@hooks/useOnyx'; import useOptimisticDraftTransactions from '@hooks/useOptimisticDraftTransactions'; import usePermissions from '@hooks/usePermissions'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePolicy from '@hooks/usePolicy'; +import useReportAttributes from '@hooks/useReportAttributes'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.tsx index 02f65ee53af48..1ef606abd801e 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/index.tsx @@ -27,12 +27,12 @@ import useIOUUtils from '@hooks/useIOUUtils'; import {useMemoizedLazyExpensifyIcons, useMemoizedLazyIllustrations} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; -import useReportAttributes from '@hooks/useReportAttributes'; import useOptimisticDraftTransactions from '@hooks/useOptimisticDraftTransactions'; import usePermissions from '@hooks/usePermissions'; import usePersonalPolicy from '@hooks/usePersonalPolicy'; import usePolicy from '@hooks/usePolicy'; import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses'; +import useReportAttributes from '@hooks/useReportAttributes'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useSelfDMReport from '@hooks/useSelfDMReport'; import useTheme from '@hooks/useTheme'; diff --git a/src/pages/settings/Rules/Fields/AddCategoryPage.tsx b/src/pages/settings/Rules/Fields/AddCategoryPage.tsx index a02c1e55b9f79..c455ca275eab7 100644 --- a/src/pages/settings/Rules/Fields/AddCategoryPage.tsx +++ b/src/pages/settings/Rules/Fields/AddCategoryPage.tsx @@ -7,12 +7,12 @@ import {getAvailableNonPersonalPolicyCategories, getDecodedCategoryName} from '@ import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; +import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {PolicyCategories} from '@src/types/onyx'; import {getEmptyObject} from '@src/types/utils/EmptyObject'; -import CONST from '@src/CONST'; type AddCategoryPageProps = PlatformStackScreenProps; diff --git a/src/pages/settings/Rules/RulePageBase.tsx b/src/pages/settings/Rules/RulePageBase.tsx index d3b800c5d4024..fa6923727b51f 100644 --- a/src/pages/settings/Rules/RulePageBase.tsx +++ b/src/pages/settings/Rules/RulePageBase.tsx @@ -17,6 +17,7 @@ import {clearDraftRule, saveExpenseRule, updateDraftRule} from '@libs/actions/Us import {getAvailableNonPersonalPolicyCategories, getDecodedCategoryName} from '@libs/CategoryUtils'; import {extractRuleFromForm, getKeyForRule} from '@libs/ExpenseRuleUtils'; import Navigation from '@libs/Navigation/Navigation'; +import {hasEnabledOptions} from '@libs/OptionsListUtils'; import Parser from '@libs/Parser'; import {getAllTaxRatesNamesAndValues, getCleanedTagName, getTagLists} from '@libs/PolicyUtils'; import {getEnabledTags} from '@libs/TagsOptionsListUtils'; @@ -29,7 +30,6 @@ import ROUTES from '@src/ROUTES'; import type {ExpenseRuleForm} from '@src/types/form'; import type {ExpenseRule, PolicyCategories, PolicyTagLists} from '@src/types/onyx'; import getEmptyArray from '@src/types/utils/getEmptyArray'; -import {hasEnabledOptions} from '@libs/OptionsListUtils'; type RulePageBaseProps = { titleKey: TranslationPaths; diff --git a/src/pages/settings/Subscription/SubscriptionPlan/index.tsx b/src/pages/settings/Subscription/SubscriptionPlan/index.tsx index 09eeed99b6625..79bf0d1e473b9 100644 --- a/src/pages/settings/Subscription/SubscriptionPlan/index.tsx +++ b/src/pages/settings/Subscription/SubscriptionPlan/index.tsx @@ -8,8 +8,8 @@ import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useSubscriptionPlan from '@hooks/useSubscriptionPlan'; import useThemeStyles from '@hooks/useThemeStyles'; -import CONST from '@src/CONST'; import variables from '@styles/variables'; +import CONST from '@src/CONST'; import ComparePlansModal from './ComparePlansModal'; import SaveWithExpensifyButton from './SaveWithExpensifyButton'; import SubscriptionPlanCard from './SubscriptionPlanCard'; diff --git a/src/pages/settings/Wallet/ExpensifyCardPage/FrozenCardIndicator.tsx b/src/pages/settings/Wallet/ExpensifyCardPage/FrozenCardIndicator.tsx index c0048960b7efd..7961179823bdb 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage/FrozenCardIndicator.tsx +++ b/src/pages/settings/Wallet/ExpensifyCardPage/FrozenCardIndicator.tsx @@ -16,8 +16,8 @@ import useThemeStyles from '@hooks/useThemeStyles'; import DateUtils from '@libs/DateUtils'; import {getDisplayNameOrDefault} from '@libs/PersonalDetailsUtils'; import variables from '@styles/variables'; -import ONYXKEYS from '@src/ONYXKEYS'; import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; type FrozenCardIndicatorProps = { cardID: string; diff --git a/src/pages/settings/Wallet/ExpensifyCardPage/index.tsx b/src/pages/settings/Wallet/ExpensifyCardPage/index.tsx index 32f900a3b9d50..9664606f5f16e 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage/index.tsx +++ b/src/pages/settings/Wallet/ExpensifyCardPage/index.tsx @@ -26,8 +26,8 @@ import useNonPersonalCardList from '@hooks/useNonPersonalCardList'; import useOnyx from '@hooks/useOnyx'; import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; -import {resetValidateActionCodeSent} from '@libs/actions/User'; import {freezeCard, unfreezeCard} from '@libs/actions/Card'; +import {resetValidateActionCodeSent} from '@libs/actions/User'; import {formatCardExpiration, getDomainCards, getTranslationKeyForLimitType, isCardFrozen, maskCard, maskPin} from '@libs/CardUtils'; import {convertToDisplayString, getCurrencyKeyByCountryCode} from '@libs/CurrencyUtils'; import DateUtils from '@libs/DateUtils'; diff --git a/src/pages/signin/SignInPageLayout/SignInHeroCopy.tsx b/src/pages/signin/SignInPageLayout/SignInHeroCopy.tsx index a4749a08a3064..0a67f3e5bbcb3 100644 --- a/src/pages/signin/SignInPageLayout/SignInHeroCopy.tsx +++ b/src/pages/signin/SignInPageLayout/SignInHeroCopy.tsx @@ -5,8 +5,8 @@ import useLocalize from '@hooks/useLocalize'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import CONST from '@src/CONST'; import variables from '@styles/variables'; +import CONST from '@src/CONST'; import type {SignInPageLayoutProps} from './types'; type SignInHeroCopyProps = Pick; diff --git a/src/pages/signin/SignInPageLayout/SignInPageContent.tsx b/src/pages/signin/SignInPageLayout/SignInPageContent.tsx index d1442c9b81c4b..e5ea93f1cf82d 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageContent.tsx +++ b/src/pages/signin/SignInPageLayout/SignInPageContent.tsx @@ -7,8 +7,8 @@ import Text from '@components/Text'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import CONST from '@src/CONST'; import variables from '@styles/variables'; +import CONST from '@src/CONST'; import SignInHeroImage from './SignInHeroImage'; import type {SignInPageLayoutProps} from './types'; diff --git a/src/pages/workspace/WorkspacesListPageHeaderButton.tsx b/src/pages/workspace/WorkspacesListPageHeaderButton.tsx index 6a6cb7215b1dc..93eaaf439fbe9 100755 --- a/src/pages/workspace/WorkspacesListPageHeaderButton.tsx +++ b/src/pages/workspace/WorkspacesListPageHeaderButton.tsx @@ -7,8 +7,8 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import interceptAnonymousUser from '@libs/interceptAnonymousUser'; import Navigation from '@libs/Navigation/Navigation'; -import ROUTES from '@src/ROUTES'; import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; type WorkspacesListPageHeaderButtonProps = { /** Whether the button to add a new workspace should be shown. */ diff --git a/src/pages/workspace/invoices/WorkspaceInvoicingDetailsSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoicingDetailsSection.tsx index c311e742843f0..887dce7dcbb31 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicingDetailsSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicingDetailsSection.tsx @@ -6,9 +6,9 @@ import useOnyx from '@hooks/useOnyx'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@navigation/Navigation'; +import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import CONST from '@src/CONST'; type WorkspaceInvoicingDetailsSectionProps = { /** The current policy ID */ diff --git a/src/pages/workspace/rules/MerchantRules/AddCategoryPage.tsx b/src/pages/workspace/rules/MerchantRules/AddCategoryPage.tsx index ac5802d03af48..7b1048f53fd32 100644 --- a/src/pages/workspace/rules/MerchantRules/AddCategoryPage.tsx +++ b/src/pages/workspace/rules/MerchantRules/AddCategoryPage.tsx @@ -6,10 +6,10 @@ import {getDecodedCategoryName} from '@libs/CategoryUtils'; import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; +import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -import CONST from '@src/CONST'; type AddCategoryPageProps = PlatformStackScreenProps; diff --git a/src/pages/workspace/rules/MerchantRules/MerchantRulePageBase.tsx b/src/pages/workspace/rules/MerchantRules/MerchantRulePageBase.tsx index e458a71164784..44def6f9bb247 100644 --- a/src/pages/workspace/rules/MerchantRules/MerchantRulePageBase.tsx +++ b/src/pages/workspace/rules/MerchantRules/MerchantRulePageBase.tsx @@ -20,6 +20,7 @@ import {deletePolicyCodingRule, setPolicyCodingRule} from '@libs/actions/Policy/ import {clearDraftMerchantRule, setDraftMerchantRule} from '@libs/actions/User'; import {getDecodedCategoryName} from '@libs/CategoryUtils'; import Navigation from '@libs/Navigation/Navigation'; +import {hasEnabledOptions} from '@libs/OptionsListUtils'; import Parser from '@libs/Parser'; import {getCleanedTagName, getTagLists} from '@libs/PolicyUtils'; import {getEnabledTags} from '@libs/TagsOptionsListUtils'; @@ -34,7 +35,6 @@ import type {MerchantRuleForm} from '@src/types/form'; import type {PolicyTagLists} from '@src/types/onyx'; import type {CodingRule} from '@src/types/onyx/Policy'; import getEmptyArray from '@src/types/utils/getEmptyArray'; -import {hasEnabledOptions} from '@libs/OptionsListUtils'; type MerchantRulePageBaseProps = { policyID: string; diff --git a/src/setup/telemetry/index.ts b/src/setup/telemetry/index.ts index 43fdcf1451e2c..deb9fac1f50fa 100644 --- a/src/setup/telemetry/index.ts +++ b/src/setup/telemetry/index.ts @@ -2,7 +2,7 @@ import * as Sentry from '@sentry/react-native'; import {Platform} from 'react-native'; import {isDevelopment} from '@libs/Environment/Environment'; import {startSpan} from '@libs/telemetry/activeSpans'; -import {browserProfilingIntegration, navigationIntegration, tracingIntegration, breadcrumbsIntegration, consoleIntegration} from '@libs/telemetry/integrations'; +import {breadcrumbsIntegration, browserProfilingIntegration, consoleIntegration, navigationIntegration, tracingIntegration} from '@libs/telemetry/integrations'; import processBeforeSendTransactions from '@libs/telemetry/middlewares'; import CONFIG from '@src/CONFIG'; import CONST from '@src/CONST'; diff --git a/tests/perf-test/OptionsListUtils.perf-test.ts b/tests/perf-test/OptionsListUtils.perf-test.ts index 8ed2e1dab090a..61bbf6e0cce63 100644 --- a/tests/perf-test/OptionsListUtils.perf-test.ts +++ b/tests/perf-test/OptionsListUtils.perf-test.ts @@ -1,8 +1,8 @@ import {rand} from '@ngneat/falso'; import type * as NativeNavigation from '@react-navigation/native'; -import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import Onyx from 'react-native-onyx'; import {measureFunction} from 'reassure'; +import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import {createOptionList, filterAndOrderOptions, getMemberInviteOptions, getSearchOptions, getValidOptions} from '@libs/OptionsListUtils'; import type {OptionData} from '@libs/ReportUtils'; import CONST from '@src/CONST'; diff --git a/tests/perf-test/SearchRouter.perf-test.tsx b/tests/perf-test/SearchRouter.perf-test.tsx index 5f68dc8c22add..f285a477f176d 100644 --- a/tests/perf-test/SearchRouter.perf-test.tsx +++ b/tests/perf-test/SearchRouter.perf-test.tsx @@ -1,5 +1,4 @@ import type * as NativeNavigation from '@react-navigation/native'; -import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import {fireEvent, screen} from '@testing-library/react-native'; import React, {useMemo} from 'react'; import Onyx from 'react-native-onyx'; @@ -9,6 +8,7 @@ import OnyxListItemProvider from '@components/OnyxListItemProvider'; import {OptionsListContext} from '@components/OptionListContextProvider'; import SearchAutocompleteInput from '@components/Search/SearchAutocompleteInput'; import SearchRouter from '@components/Search/SearchRouter/SearchRouter'; +import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import {createOptionList} from '@libs/OptionsListUtils'; import ComposeProviders from '@src/components/ComposeProviders'; import CONST from '@src/CONST'; diff --git a/tests/unit/CardUtilsTest.ts b/tests/unit/CardUtilsTest.ts index ca01cfc0de3a9..0bde18264c734 100644 --- a/tests/unit/CardUtilsTest.ts +++ b/tests/unit/CardUtilsTest.ts @@ -1,7 +1,7 @@ -import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import {buildFeedKeysWithAssignedCards} from '@selectors/Card'; import lodashSortBy from 'lodash/sortBy'; import type {OnyxCollection} from 'react-native-onyx'; +import type {FeedKeysWithAssignedCards} from '@hooks/useFeedKeysWithAssignedCards'; import type IllustrationsType from '@styles/theme/illustrations/types'; // eslint-disable-next-line no-restricted-imports import type * as Illustrations from '@src/components/Icon/Illustrations'; @@ -24,7 +24,6 @@ import { getCardDescription, getCardFeedIcon, getCardFeedWithDomainID, - getDisplayableExpensifyCards, getCardsByCardholderName, getCompanyCardDescription, getCompanyCardFeed, @@ -32,6 +31,7 @@ import { getCustomFeedNameFromFeeds, getCustomOrFormattedFeedName, getDefaultExpensifyCardLimitType, + getDisplayableExpensifyCards, getFeedNameForDisplay, getFeedType, getFilteredCardList, diff --git a/tests/unit/MiddlewareTest.ts b/tests/unit/MiddlewareTest.ts index dd85a9522659f..b8a2ea3b28166 100644 --- a/tests/unit/MiddlewareTest.ts +++ b/tests/unit/MiddlewareTest.ts @@ -1,6 +1,7 @@ import Onyx from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import SaveResponseInOnyx from '@libs/Middleware/SaveResponseInOnyx'; +import CONST from '@src/CONST'; // This import is needed to initialize the Onyx connections that call replaceOptimisticReportWithActualReport import '@src/libs/actions/replaceOptimisticReportWithActualReport'; import HttpUtils from '@src/libs/HttpUtils'; @@ -9,7 +10,6 @@ import * as MainQueue from '@src/libs/Network/MainQueue'; import * as NetworkStore from '@src/libs/Network/NetworkStore'; import * as SequentialQueue from '@src/libs/Network/SequentialQueue'; import * as Request from '@src/libs/Request'; -import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Report as OnyxReport, PersonalDetailsList} from '@src/types/onyx'; import * as TestHelper from '../utils/TestHelper'; diff --git a/tests/unit/OptionsListUtilsTest.tsx b/tests/unit/OptionsListUtilsTest.tsx index 563253c5b0ae2..09324edb76f98 100644 --- a/tests/unit/OptionsListUtilsTest.tsx +++ b/tests/unit/OptionsListUtilsTest.tsx @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import {act, render, renderHook} from '@testing-library/react-native'; import {View} from 'react-native'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; @@ -7,6 +6,7 @@ import Onyx from 'react-native-onyx'; import ComposeProviders from '@components/ComposeProviders'; import {LocaleContextProvider} from '@components/LocaleContextProvider'; import OnyxListItemProvider from '@components/OnyxListItemProvider'; +import type {PrivateIsArchivedMap} from '@hooks/usePrivateIsArchivedMap'; import useReportIsArchived from '@hooks/useReportIsArchived'; import DateUtils from '@libs/DateUtils'; import {translate} from '@libs/Localize'; diff --git a/tests/unit/RenderHTMLTest.tsx b/tests/unit/RenderHTMLTest.tsx index 3fb54bf127f14..fea313f747029 100644 --- a/tests/unit/RenderHTMLTest.tsx +++ b/tests/unit/RenderHTMLTest.tsx @@ -1,8 +1,8 @@ import {render} from '@testing-library/react-native'; import React from 'react'; import {View} from 'react-native'; -import Text from '@components/Text'; import RenderHTML from '@components/RenderHTML'; +import Text from '@components/Text'; jest.mock('@hooks/useWindowDimensions', () => () => ({windowWidth: 400})); jest.mock('react-native-render-html', () => { diff --git a/tests/unit/generateTranslationsTest.ts b/tests/unit/generateTranslationsTest.ts index d44d9155d5549..cfa2f59586a45 100644 --- a/tests/unit/generateTranslationsTest.ts +++ b/tests/unit/generateTranslationsTest.ts @@ -114,6 +114,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello', farewell: '[it] Goodbye', @@ -172,6 +173,7 @@ describe('generateTranslations', () => { import Log from '@libs/Log'; import CONST from '@src/CONST'; import type en from './en'; + if (CONST.REPORT.TYPE.EXPENSE == 'true') { Log.info('This should not be translated'); console.log('This should not be translated either'); @@ -245,6 +247,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { simple: (name: string, greeting: string) => \`[it] \${greeting} good sir \${name}!\`, simpleWithDotNotation: (myParams: {name: string; greeting: string}) => \`[it] \${myParams.greeting} good sir \${myParams.greeting}!\`, @@ -303,6 +306,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { updateReportFieldAllOptionsDisabled: (count: number, enabled: boolean, option: string) => { if (toggledOptionsCount > 1) { @@ -359,6 +363,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { bank: '[it][ctx: As in a financial institution] Bank', bankTemplate: \`[it][ctx: As in a financial institution] Bank\`, @@ -463,6 +468,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello', farewell: '[it] Goodbye', @@ -498,6 +504,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { myFunc: ({brand}: {brand: 'Apple' | 'Google'}) => \`[it] \${brand} Phone\`, }; @@ -523,6 +530,7 @@ describe('generateTranslations', () => { expect(itContent).toStrictEqual( `${GENERATED_FILE_PREFIX}${dedent(` import type en from './en'; + const strings = { hello: '[it] こんにちは', world: '[it] world', @@ -567,6 +575,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello', unchanged: '[it] Unchanged', @@ -654,6 +663,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello', farewell: '[it] Goodbye', @@ -729,6 +739,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello (existing)', common: { @@ -798,6 +809,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello (existing)', common: { @@ -905,6 +917,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { greeting: '[it] Hello (existing)', common: { @@ -1168,6 +1181,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { deepTemplate: (user: User, settings: Settings) => \`[it] Old complex template\`, unchanged: '[it] Keep this (existing)' @@ -1240,6 +1254,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { keep: { this: '[it] Keep this section (existing)' @@ -1340,6 +1355,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { existingSection: { keep: '[it] Keep this existing translation', @@ -1419,6 +1435,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { existingSection: { keep: '[it] Keep this existing translation', @@ -1492,6 +1509,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { testDrive: { modal: { @@ -1585,6 +1603,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { onboarding: { tasks: { @@ -1643,6 +1662,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { common: { tasks: '[it] Tasks', @@ -1695,6 +1715,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { unchanged: '[it] This stays the same', pin: '[it] Pin', @@ -1772,6 +1793,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { unchanged: '[it] This stays the same', // @context original context @@ -1858,6 +1880,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { unchanged: '[it] This stays the same', // @context as a verb, not a noun @@ -1940,6 +1963,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { unchanged: '[it] This stays the same', pin: '[it] Pin (existing)', @@ -2013,6 +2037,7 @@ describe('generateTranslations', () => { IT_PATH, dedent(` import type en from './en'; + const strings = { unchanged: '[it] This stays the same', // TODO: fix this diff --git a/tests/unit/hooks/useMappedPolicies.test.ts b/tests/unit/hooks/useMappedPolicies.test.ts index 73b0eee71c640..6ad284d02e5d9 100644 --- a/tests/unit/hooks/useMappedPolicies.test.ts +++ b/tests/unit/hooks/useMappedPolicies.test.ts @@ -1,7 +1,7 @@ import {renderHook, waitFor} from '@testing-library/react-native'; import Onyx from 'react-native-onyx'; -import useMappedPolicies from '@hooks/useMappedPolicies'; import type {OnyxEntry} from 'react-native-onyx'; +import useMappedPolicies from '@hooks/useMappedPolicies'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Policy} from '@src/types/onyx'; diff --git a/tests/unit/hooks/useSplitContextHooks.test.tsx b/tests/unit/hooks/useSplitContextHooks.test.tsx index 3bde1845d5836..9bb8ea4635250 100644 --- a/tests/unit/hooks/useSplitContextHooks.test.tsx +++ b/tests/unit/hooks/useSplitContextHooks.test.tsx @@ -1,5 +1,5 @@ -import React from 'react'; import {act, renderHook} from '@testing-library/react-native'; +import React from 'react'; import type {PropsWithChildren} from 'react'; import type {SharedValue} from 'react-native-reanimated'; import { @@ -18,9 +18,9 @@ import type {CustomStatusBarAndBackgroundActionsContextType, CustomStatusBarAndB import {DragAndDropActionsContext, DragAndDropStateContext, useDragAndDropActions, useDragAndDropState} from '@components/DragAndDrop/Provider/DragAndDropContext'; import type {DragAndDropActionsContextType, DragAndDropStateContextType} from '@components/DragAndDrop/Provider/types'; import MultifactorAuthenticationStateProvider, { + DEFAULT_STATE, useMultifactorAuthenticationActions, useMultifactorAuthenticationState, - DEFAULT_STATE, } from '@components/MultifactorAuthentication/Context/State'; /**