diff --git a/.github/actions/javascript/proposalPoliceComment/index.js b/.github/actions/javascript/proposalPoliceComment/index.js index 479ab2a74182..d4a10848beb3 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -11696,7 +11696,6 @@ async function run() { const duplicateCheckPrompt = proposalPolice_1.default.getPromptForNewProposalDuplicateCheck(previousProposal.body, newProposalBody); const duplicateCheckResponse = await openAI.promptAssistant(assistantID, duplicateCheckPrompt); let similarityPercentage = 0; - // eslint-disable-next-line @typescript-eslint/no-deprecated -- TODO: refactor `parseAssistantResponse` to use `promptResponses` instead const parsedDuplicateCheckResponse = openAI.parseAssistantResponse(duplicateCheckResponse); core.startGroup('Parsed Duplicate Check Response'); console.log('parsedDuplicateCheckResponse: ', parsedDuplicateCheckResponse); @@ -11734,7 +11733,6 @@ async function run() { ? proposalPolice_1.default.getPromptForNewProposalTemplateCheck(payload.comment?.body) : proposalPolice_1.default.getPromptForEditedProposal(payload.changes.body?.from, payload.comment?.body); const assistantResponse = await openAI.promptAssistant(assistantID, prompt); - // eslint-disable-next-line @typescript-eslint/no-deprecated -- TODO: refactor `parseAssistantResponse` to use `promptResponses` instead const parsedAssistantResponse = openAI.parseAssistantResponse(assistantResponse); core.startGroup('Parsed Assistant Response'); console.log('parsedAssistantResponse: ', parsedAssistantResponse); @@ -12554,15 +12552,11 @@ class OpenAIUtils { */ async promptAssistant(assistantID, userMessage) { // 1. Create a thread - const thread = await (0, retryWithBackoff_1.default)(() => - // eslint-disable-next-line @typescript-eslint/no-deprecated - this.client.beta.threads.create({ + const thread = await (0, retryWithBackoff_1.default)(() => this.client.beta.threads.create({ messages: [{ role: OpenAIUtils.USER, content: userMessage }], }), { isRetryable: (err) => OpenAIUtils.isRetryableError(err) }); // 2. Create a run on the thread - let run = await (0, retryWithBackoff_1.default)(() => - // eslint-disable-next-line @typescript-eslint/no-deprecated - this.client.beta.threads.runs.create(thread.id, { + let run = await (0, retryWithBackoff_1.default)(() => this.client.beta.threads.runs.create(thread.id, { // eslint-disable-next-line @typescript-eslint/naming-convention assistant_id: assistantID, }), { isRetryable: (err) => OpenAIUtils.isRetryableError(err) }); @@ -12570,7 +12564,7 @@ class OpenAIUtils { let response = ''; let count = 0; while (!response && count < OpenAIUtils.MAX_POLL_COUNT) { - // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-deprecated + // eslint-disable-next-line @typescript-eslint/naming-convention run = await this.client.beta.threads.runs.retrieve(run.id, { thread_id: thread.id }); if (run.status !== OpenAIUtils.OPENAI_RUN_COMPLETED) { count++; @@ -12579,7 +12573,6 @@ class OpenAIUtils { }); continue; } - // eslint-disable-next-line @typescript-eslint/no-deprecated for await (const message of this.client.beta.threads.messages.list(thread.id)) { if (message.role !== OpenAIUtils.ASSISTANT) { continue; diff --git a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts index 9d95f91e8944..bab4e2bc6a62 100644 --- a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts +++ b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts @@ -147,7 +147,6 @@ async function run() { const duplicateCheckPrompt = PROPOSAL_POLICE_TEMPLATES.getPromptForNewProposalDuplicateCheck(previousProposal.body, newProposalBody); const duplicateCheckResponse = await openAI.promptAssistant(assistantID, duplicateCheckPrompt); let similarityPercentage = 0; - // eslint-disable-next-line @typescript-eslint/no-deprecated -- TODO: refactor `parseAssistantResponse` to use `promptResponses` instead const parsedDuplicateCheckResponse = openAI.parseAssistantResponse(duplicateCheckResponse); core.startGroup('Parsed Duplicate Check Response'); console.log('parsedDuplicateCheckResponse: ', parsedDuplicateCheckResponse); @@ -188,7 +187,6 @@ async function run() { : PROPOSAL_POLICE_TEMPLATES.getPromptForEditedProposal(payload.changes.body?.from, payload.comment?.body); const assistantResponse = await openAI.promptAssistant(assistantID, prompt); - // eslint-disable-next-line @typescript-eslint/no-deprecated -- TODO: refactor `parseAssistantResponse` to use `promptResponses` instead const parsedAssistantResponse = openAI.parseAssistantResponse(assistantResponse); core.startGroup('Parsed Assistant Response'); console.log('parsedAssistantResponse: ', parsedAssistantResponse); diff --git a/config/eslint/eslint.seatbelt.tsv b/config/eslint/eslint.seatbelt.tsv index ba403dee3daf..4547f4f9f1d4 100644 --- a/config/eslint/eslint.seatbelt.tsv +++ b/config/eslint/eslint.seatbelt.tsv @@ -3,10 +3,15 @@ "../../.github/actions/javascript/getAndroidRolloutPercentage/getAndroidRolloutPercentage.ts" "rulesdir/no-default-id-values" 1 "../../.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts" "no-restricted-imports" 1 +"../../.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts" "@typescript-eslint/no-deprecated/openAI.parseAssistantResponse" 2 "../../__mocks__/@react-native-camera-roll/camera-roll.ts" "@typescript-eslint/no-deprecated/CameraRoll.save" 1 "../../__mocks__/expo-video.tsx" "react-hooks/refs" 2 "../../__mocks__/react-native-safe-area-context.tsx" "react-hooks/refs" 4 "../../modules/ExpensifyNitroUtils/src/index.ts" "no-restricted-syntax" 1 +"../../scripts/utils/OpenAIUtils.ts" "@typescript-eslint/no-deprecated/this.client.beta.threads.create" 1 +"../../scripts/utils/OpenAIUtils.ts" "@typescript-eslint/no-deprecated/this.client.beta.threads.messages.list" 1 +"../../scripts/utils/OpenAIUtils.ts" "@typescript-eslint/no-deprecated/this.client.beta.threads.runs.create" 1 +"../../scripts/utils/OpenAIUtils.ts" "@typescript-eslint/no-deprecated/this.client.beta.threads.runs.retrieve" 1 "../../src/DeepLinkHandler.tsx" "no-restricted-syntax" 1 "../../src/Expensify.tsx" "no-restricted-syntax" 1 "../../src/Expensify.tsx" "react-hooks/refs" 1 @@ -14,9 +19,12 @@ "../../src/GlobalModals.tsx" "no-restricted-syntax" 2 "../../src/ONYXKEYS.ts" "no-restricted-syntax" 2 "../../src/components/ActionSheetAwareScrollView/useActionSheetAwareScrollViewRef.ts" "react-hooks/immutability" 1 +"../../src/components/ActionSheetAwareScrollView/useActionSheetKeyboardSpacing.ts" "@typescript-eslint/no-deprecated/useScrollViewOffset" 1 +"../../src/components/AddExistingExpenseFooter.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/AddressSearch/CurrentLocationButton.tsx" "no-restricted-syntax" 1 "../../src/components/AnchorForAttachmentsOnly/index.tsx" "no-restricted-syntax" 1 "../../src/components/AnchorForCommentsOnly/index.tsx" "no-restricted-syntax" 1 +"../../src/components/AnimatedFlatListWithCellRenderer.tsx" "@typescript-eslint/no-deprecated/Animated.createAnimatedComponent" 1 "../../src/components/AnimatedFlatListWithCellRenderer.tsx" "react-hooks/refs" 2 "../../src/components/AnimatedSubmitButton/index.tsx" "react-hooks/refs" 12 "../../src/components/AnimatedSubmitButton/index.tsx" "react-hooks/set-state-in-effect" 1 @@ -29,7 +37,9 @@ "../../src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/TransparentOverlay/TransparentOverlay.tsx" "no-restricted-syntax" 1 "../../src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/TransparentOverlay/TransparentOverlay.tsx" "react-hooks/refs" 1 "../../src/components/AutoCompleteSuggestions/index.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/components/AutoSubmitModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/AvatarButtonWithIcon.tsx" "react-hooks/static-components" 1 +"../../src/components/AvatarCropModal/AvatarCropModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/AvatarSelector.tsx" "no-restricted-syntax" 2 "../../src/components/AvatarWithImagePicker.tsx" "react-hooks/set-state-in-effect" 2 "../../src/components/ButtonWithDropdownMenu/index.tsx" "react-hooks/preserve-manual-memoization" 1 @@ -43,9 +53,11 @@ "../../src/components/ConnectToQuickbooksOnlineFlow/index.tsx" "no-restricted-syntax" 2 "../../src/components/ConnectToXeroFlow/index.native.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/ConnectToXeroFlow/index.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/components/ContactPermissionModal/index.native.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/DatePicker/CalendarPicker/YearPickerModal.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/DatePicker/DatePickerModal.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/components/DatePicker/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/DatePicker/index.tsx" "react-hooks/refs" 1 "../../src/components/DatePicker/index.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/DisplayNames/DisplayNamesWithTooltip.tsx" "react-hooks/refs" 6 @@ -58,13 +70,16 @@ "../../src/components/EmojiSuggestions.tsx" "no-restricted-syntax" 1 "../../src/components/EnvironmentBadge.tsx" "no-restricted-syntax" 1 "../../src/components/ExplanationModal.tsx" "no-restricted-syntax" 1 +"../../src/components/FeatureTrainingModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/components/FeatureTrainingModal.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/FeedbackSurvey.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/FilePicker/index.native.tsx" "react-hooks/refs" 1 "../../src/components/FilePicker/index.tsx" "react-hooks/refs" 1 "../../src/components/FlatList/FlatList/index.tsx" "react-hooks/refs" 1 +"../../src/components/Form/FormProvider.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/Form/FormProvider.tsx" "react-hooks/immutability" 2 "../../src/components/Form/FormProvider.tsx" "react-hooks/refs" 2 +"../../src/components/Form/FormWrapper.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/Form/InputWrapper.tsx" "react-hooks/refs" 1 "../../src/components/FullscreenLoadingIndicator.tsx" "@typescript-eslint/no-deprecated/StyleSheet.absoluteFillObject" 1 "../../src/components/GrowlNotification/index.tsx" "no-restricted-syntax" 1 @@ -78,6 +93,7 @@ "../../src/components/KYCWall/BaseKYCWall.tsx" "react-hooks/refs" 2 "../../src/components/LoadingIndicator.tsx" "@typescript-eslint/no-deprecated/StyleSheet.absoluteFillObject" 1 "../../src/components/LocaleContextProvider.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/components/Lottie/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/Lottie/index.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/MagicCodeInput.tsx" "react-hooks/refs" 1 "../../src/components/MagicCodeInput.tsx" "react-hooks/set-state-in-effect" 3 @@ -88,11 +104,19 @@ "../../src/components/MessagesRow.tsx" "no-restricted-syntax" 1 "../../src/components/Modal/BaseModal.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/Modal/ReanimatedModal/Container/index.web.tsx" "react-hooks/refs" 1 +"../../src/components/Modal/ReanimatedModal/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.clearInteractionHandle" 3 +"../../src/components/Modal/ReanimatedModal/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.createInteractionHandle" 2 "../../src/components/Modal/ReanimatedModal/index.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/components/MoneyReportHeaderModals.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/MoneyRequestAmountInput.tsx" "react-hooks/immutability" 2 +"../../src/components/MoneyRequestConfirmationList.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/MoneyRequestConfirmationList.tsx" "react-hooks/set-state-in-effect" 2 +"../../src/components/MoneyRequestHeaderSecondaryActions.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 "../../src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx" "react-hooks/refs" 6 "../../src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx" "react-hooks/set-state-in-effect" 3 +"../../src/components/MoneyRequestReportView/MoneyRequestReportView.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/MultiGestureCanvas/index.tsx" "no-restricted-syntax" 1 "../../src/components/MultiGestureCanvas/index.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/components/MultiGestureCanvas/index.tsx" "react-hooks/refs" 2 @@ -105,6 +129,7 @@ "../../src/components/NumberWithSymbolForm.tsx" "react-hooks/set-state-in-effect" 2 "../../src/components/OptionListContextProvider.tsx" "react-hooks/refs" 2 "../../src/components/OptionListContextProvider.tsx" "react-hooks/set-state-in-effect" 3 +"../../src/components/OptionRow.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/OptionRow.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/PDFView/index.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/PopoverMenu.tsx" "react-hooks/preserve-manual-memoization" 3 @@ -116,6 +141,7 @@ "../../src/components/RadioButtonWithLabel.tsx" "no-restricted-syntax" 1 "../../src/components/Reactions/AddReactionBubble.tsx" "react-hooks/refs" 1 "../../src/components/Reactions/MiniQuickEmojiReactions.tsx" "react-hooks/refs" 1 +"../../src/components/Reactions/ReportActionItemEmojiReactions.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/ReportActionItem/MoneyRequestReceiptView.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx" "react-hooks/preserve-manual-memoization" 2 "../../src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx" "react-hooks/refs" 1 @@ -127,6 +153,7 @@ "../../src/components/Search/FilterDropdowns/CardSelectPopup.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/Search/FilterDropdowns/UserSelectPopup.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/Search/SearchPageHeader/useSearchPageInput.tsx" "react-hooks/set-state-in-effect" 2 +"../../src/components/Search/SearchRouter/SearchRouter.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/components/Search/SearchSingleSelectionPicker.tsx" "react-hooks/set-state-in-effect" 1 "../../src/components/Search/index.tsx" "react-hooks/exhaustive-deps" 1 "../../src/components/Search/index.tsx" "react-hooks/preserve-manual-memoization" 2 @@ -137,6 +164,9 @@ "../../src/components/SingleOptionSelector.tsx" "no-restricted-syntax" 1 "../../src/components/SwipeableView/index.native.tsx" "react-hooks/refs" 2 "../../src/components/SymbolButton.tsx" "no-restricted-syntax" 1 +"../../src/components/TestDrive/Modal/AdminTestDriveModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/components/TestDrive/TestDriveDemo.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/components/TextInput/BaseTextInput/implementation/index.native.tsx" "react-hooks/refs" 2 "../../src/components/TextInput/BaseTextInput/implementation/index.native.tsx" "react-hooks/static-components" 1 "../../src/components/TextInput/BaseTextInput/implementation/index.tsx" "react-hooks/refs" 2 @@ -156,17 +186,22 @@ "../../src/components/VideoPlayer/BaseVideoPlayer.tsx" "react-hooks/refs" 13 "../../src/components/VideoPlayer/BaseVideoPlayer.tsx" "react-hooks/set-state-in-effect" 2 "../../src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx" "react-hooks/exhaustive-deps" 1 +"../../src/components/WalletStatementModal/index.tsx" "@typescript-eslint/no-deprecated/frameBorder" 1 "../../src/components/WideRHPContextProvider/useShouldRenderOverlay.ts" "react-hooks/set-state-in-effect" 1 "../../src/components/ZeroWidthView/index.tsx" "no-restricted-syntax" 2 "../../src/hooks/useAnimatedHighlightStyle/index.ts" "react-hooks/set-state-in-effect" 2 +"../../src/hooks/useAutoFocusInput.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/useBasePopoverReactionList/index.ts" "no-restricted-syntax" 2 "../../src/hooks/useBasePopoverReactionList/index.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useCachedImageSource.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useCancellationType.ts" "react-hooks/refs" 2 "../../src/hooks/useCancellationType.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useDebouncedState.ts" "react-hooks/refs" 2 +"../../src/hooks/useDialogContainerFocus/index.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/useDomainGroupFilter.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useDragAndDrop/types.ts" "@typescript-eslint/no-deprecated/React.MutableRefObject" 1 +"../../src/hooks/useExpenseActions.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 +"../../src/hooks/useFilesValidation.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/hooks/useInitial.ts" "react-hooks/refs" 4 "../../src/hooks/useIsBlockedToAddFeed.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useIsOwnWorkspaceChatRef.ts" "react-hooks/refs" 2 @@ -174,29 +209,42 @@ "../../src/hooks/useLazyAsset.ts" "react-hooks/set-state-in-effect" 1 "../../src/hooks/useNativeCamera.ts" "react-hooks/refs" 1 "../../src/hooks/useNewTransactions.ts" "react-hooks/refs" 2 +"../../src/hooks/useOnboardingFlow.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/usePaginatedReportActions.ts" "react-hooks/refs" 1 "../../src/hooks/usePaymentOptions.ts" "react-hooks/refs" 1 "../../src/hooks/usePrevious.ts" "react-hooks/refs" 1 "../../src/hooks/useProactiveAppReview.ts" "react-hooks/purity" 1 +"../../src/hooks/useRestoreInputFocus/index.android.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/useReviewDuplicatesNavigation.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/hooks/useSearchBulkActions.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 5 "../../src/hooks/useSearchBulkActions.ts" "react-hooks/exhaustive-deps" 1 "../../src/hooks/useSearchBulkActions.ts" "react-hooks/preserve-manual-memoization" 2 "../../src/hooks/useSearchBulkActions.ts" "react-hooks/refs" 1 +"../../src/hooks/useSearchHighlightAndScroll.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/useSearchResults.ts" "react-hooks/set-state-in-effect" 1 +"../../src/hooks/useSearchSelector.native.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/hooks/useSelectionModeReportActions.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/hooks/useSidebarOrderedReports.tsx" "react-hooks/purity" 1 "../../src/hooks/useSidebarOrderedReports.tsx" "react-hooks/refs" 5 "../../src/hooks/useSidebarOrderedReports.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/hooks/useSingleExecution/index.native.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/hooks/useSingleExecution/index.native.ts" "react-hooks/refs" 1 "../../src/hooks/useStepFormSubmit.ts" "no-restricted-syntax" 1 "../../src/hooks/useSubStep/index.ts" "react-hooks/refs" 2 "../../src/libs/Accessibility/moveAccessibilityFocus/types.ts" "@typescript-eslint/no-deprecated/ElementRef" 1 +"../../src/libs/AttachmentModalHandler/index.ios.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/Clipboard/index.ts" "@typescript-eslint/no-deprecated/document.execCommand" 1 "../../src/libs/Clipboard/index.ts" "no-restricted-syntax" 1 +"../../src/libs/ComposerFocusManager.ts" "@typescript-eslint/no-deprecated/TextInput.State.currentlyFocusedField" 1 "../../src/libs/ComposerUtils/index.ts" "no-restricted-syntax" 1 "../../src/libs/CurrencyUtils.ts" "rulesdir/no-onyx-connect" 1 "../../src/libs/Environment/betaChecker/index.android.ts" "no-restricted-syntax" 1 +"../../src/libs/ErrorUtils.ts" "@typescript-eslint/no-deprecated/translateLocal" 1 "../../src/libs/Fullstory/index.ts" "no-restricted-syntax" 1 +"../../src/libs/KeyboardShortcut/isEnterWhileComposition.ts" "@typescript-eslint/no-deprecated/event.keyCode" 1 "../../src/libs/KeyboardShortcut/isEnterWhileComposition.ts" "no-restricted-syntax" 1 "../../src/libs/LocalePhoneNumber.ts" "rulesdir/no-onyx-connect" 1 +"../../src/libs/Localize/index.ts" "@typescript-eslint/no-deprecated/translateLocal" 1 "../../src/libs/Middleware/HandleUnusedOptimisticID.ts" "no-restricted-syntax" 1 "../../src/libs/Middleware/SaveResponseInOnyx.ts" "no-restricted-syntax" 1 "../../src/libs/Navigation/AppNavigator/AuthScreens.tsx" "no-restricted-syntax" 1 @@ -209,23 +257,51 @@ "../../src/libs/Navigation/AppNavigator/KeyboardShortcutsHandler/ShortcutsOverviewHandler.tsx" "no-restricted-syntax" 1 "../../src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx" "no-restricted-syntax" 2 "../../src/libs/Navigation/AppNavigator/Navigators/ReportsSplitNavigator.tsx" "no-restricted-syntax" 1 +"../../src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx" "no-restricted-syntax" 1 "../../src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx" "no-restricted-syntax" 1 "../../src/libs/Navigation/AppNavigator/Navigators/TestToolsModalNavigator.tsx" "no-restricted-syntax" 1 "../../src/libs/Navigation/AppNavigator/UserStatusHandler.tsx" "no-restricted-syntax" 1 "../../src/libs/Navigation/helpers/createNormalizedConfigs.ts" "@typescript-eslint/no-deprecated/escape" 1 +"../../src/libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/Navigation/navigateAfterInteraction/index.ios.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/Network/enhanceParameters.ts" "no-restricted-syntax" 1 "../../src/libs/Network/index.ts" "no-restricted-syntax" 1 +"../../src/libs/NextStepUtils.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 2 +"../../src/libs/Notification/LocalNotification/BrowserNotifications.ts" "@typescript-eslint/no-deprecated/translateLocal" 1 "../../src/libs/Notification/LocalNotification/BrowserNotifications.ts" "no-restricted-syntax" 2 "../../src/libs/Notification/PushNotification/shouldShowPushNotification.ts" "no-restricted-syntax" 2 "../../src/libs/Notification/PushNotification/subscribeToPushNotifications.ts" "no-restricted-syntax" 1 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/deprecatedAllReportActions" 2 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/deprecatedAllSortedReportActions[iouReportID]" 1 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/deprecatedAllSortedReportActions[reportID]" 1 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/deprecatedCachedOneTransactionThreadReportIDs[reportID]" 2 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/deprecatedLastReportActions[reportID]" 3 +"../../src/libs/OptionsListUtils/index.ts" "@typescript-eslint/no-deprecated/translateLocal" 18 "../../src/libs/OptionsListUtils/index.ts" "rulesdir/no-onyx-connect" 3 +"../../src/libs/OptionsListUtils/searchMatchUtils.ts" "@typescript-eslint/no-deprecated/translateLocal" 2 "../../src/libs/Parser.ts" "rulesdir/no-onyx-connect" 2 +"../../src/libs/PersonalDetailsUtils.ts" "@typescript-eslint/no-deprecated/translateLocal" 3 "../../src/libs/PersonalDetailsUtils.ts" "rulesdir/no-onyx-connect" 2 +"../../src/libs/Pusher/index.native.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/Pusher/index.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/ReceiptUploadRetryHandler/handleFileRetry.ts" "no-restricted-syntax" 2 +"../../src/libs/ReportActionItemEventHandler/index.android.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/ReportActionsUtils.ts" "@typescript-eslint/no-deprecated/getReportName" 2 +"../../src/libs/ReportActionsUtils.ts" "@typescript-eslint/no-deprecated/getReportNameCallback" 1 +"../../src/libs/ReportActionsUtils.ts" "@typescript-eslint/no-deprecated/reportAction.sequenceNumber" 1 +"../../src/libs/ReportActionsUtils.ts" "@typescript-eslint/no-deprecated/reportAction?.originalMessage" 2 "../../src/libs/ReportActionsUtils.ts" "rulesdir/no-onyx-connect" 3 +"../../src/libs/ReportNameUtils.ts" "@typescript-eslint/no-deprecated/translateLocal" 12 +"../../src/libs/ReportUtils.ts" "@typescript-eslint/no-deprecated/getPolicy" 29 +"../../src/libs/ReportUtils.ts" "@typescript-eslint/no-deprecated/getReportName" 10 +"../../src/libs/ReportUtils.ts" "@typescript-eslint/no-deprecated/getSearchReportName" 1 +"../../src/libs/ReportUtils.ts" "@typescript-eslint/no-deprecated/translateLocal" 43 "../../src/libs/ReportUtils.ts" "rulesdir/no-onyx-connect" 17 +"../../src/libs/SearchUIUtils.ts" "@typescript-eslint/no-deprecated/getReportName" 1 +"../../src/libs/SearchUIUtils.ts" "@typescript-eslint/no-deprecated/getSearchReportName" 1 "../../src/libs/SubscriptionUtils.ts" "rulesdir/no-onyx-connect" 2 +"../../src/libs/TransactionUtils/index.ts" "@typescript-eslint/no-deprecated/translateLocal" 5 "../../src/libs/UnreadIndicatorUpdater/index.ts" "no-restricted-syntax" 1 "../../src/libs/Violations/ViolationsUtils.ts" "no-restricted-syntax" 2 "../../src/libs/actions/App.ts" "no-restricted-syntax" 1 @@ -239,26 +315,53 @@ "../../src/libs/actions/ExitSurvey.ts" "no-restricted-syntax" 1 "../../src/libs/actions/Help.ts" "no-restricted-syntax" 1 "../../src/libs/actions/IOU/BulkEdit.ts" "no-restricted-syntax" 2 +"../../src/libs/actions/IOU/DeleteMoneyRequest.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/actions/IOU/DeleteMoneyRequest.ts" "@typescript-eslint/no-deprecated/Localize.translateLocal" 1 "../../src/libs/actions/IOU/DeleteMoneyRequest.ts" "no-restricted-syntax" 2 "../../src/libs/actions/IOU/Duplicate.ts" "no-restricted-syntax" 2 +"../../src/libs/actions/IOU/Hold.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 2 "../../src/libs/actions/IOU/Hold.ts" "no-restricted-syntax" 2 +"../../src/libs/actions/IOU/PayMoneyRequest.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 3 "../../src/libs/actions/IOU/PayMoneyRequest.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/PerDiem.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 +"../../src/libs/actions/IOU/PerDiem.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 1 "../../src/libs/actions/IOU/PerDiem.ts" "no-restricted-syntax" 2 +"../../src/libs/actions/IOU/Receipt.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 1 "../../src/libs/actions/IOU/Receipt.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/RejectMoneyRequest.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 2 "../../src/libs/actions/IOU/RejectMoneyRequest.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/ReportWorkflow.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 7 "../../src/libs/actions/IOU/ReportWorkflow.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/SendInvoice.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/IOU/SendInvoice.ts" "no-restricted-syntax" 1 "../../src/libs/actions/IOU/SendMoney.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/Split.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 4 +"../../src/libs/actions/IOU/Split.ts" "@typescript-eslint/no-deprecated/Localize.translateLocal" 2 +"../../src/libs/actions/IOU/Split.ts" "@typescript-eslint/no-deprecated/getMoneyRequestPolicyTags" 1 +"../../src/libs/actions/IOU/Split.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 1 "../../src/libs/actions/IOU/Split.ts" "no-restricted-syntax" 3 +"../../src/libs/actions/IOU/SplitTransactionUpdate.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/libs/actions/IOU/SplitTransactionUpdate.ts" "@typescript-eslint/no-deprecated/getMoneyRequestPolicyTags" 1 +"../../src/libs/actions/IOU/SplitTransactionUpdate.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 1 +"../../src/libs/actions/IOU/TrackExpense.ts" "@typescript-eslint/no-deprecated/getMoneyRequestPolicyTags" 2 "../../src/libs/actions/IOU/TrackExpense.ts" "no-restricted-syntax" 2 +"../../src/libs/actions/IOU/UpdateMoneyRequest.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 1 +"../../src/libs/actions/IOU/UpdateMoneyRequest.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 13 "../../src/libs/actions/IOU/UpdateMoneyRequest.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/IOU/index.ts" "@typescript-eslint/no-deprecated/Localize.translateLocal" 1 +"../../src/libs/actions/IOU/index.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 2 +"../../src/libs/actions/IOU/index.ts" "@typescript-eslint/no-deprecated/getMoneyRequestPolicyTags" 1 +"../../src/libs/actions/IOU/index.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 2 "../../src/libs/actions/IOU/index.ts" "no-restricted-syntax" 2 "../../src/libs/actions/IOU/index.ts" "rulesdir/no-onyx-connect" 11 "../../src/libs/actions/ImportTransactions.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/InputFocus/index.website.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/InputFocus/index.website.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/Link.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/Link.ts" "no-restricted-syntax" 3 "../../src/libs/actions/MapboxToken.ts" "no-restricted-syntax" 2 "../../src/libs/actions/MergeAccounts.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/MergeTransaction.ts" "@typescript-eslint/no-deprecated/getPolicyTagsData" 1 "../../src/libs/actions/MergeTransaction.ts" "no-restricted-syntax" 1 "../../src/libs/actions/Onboarding.ts" "no-restricted-syntax" 1 "../../src/libs/actions/OnyxUpdateManager/utils/DeferredOnyxUpdates.ts" "no-restricted-syntax" 1 @@ -273,6 +376,8 @@ "../../src/libs/actions/Policy/Member.ts" "rulesdir/no-onyx-connect" 1 "../../src/libs/actions/Policy/PerDiem.ts" "no-restricted-syntax" 1 "../../src/libs/actions/Policy/Plan.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/Policy/Policy.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 1 +"../../src/libs/actions/Policy/Policy.ts" "@typescript-eslint/no-deprecated/translateLocal" 1 "../../src/libs/actions/Policy/Policy.ts" "no-restricted-syntax" 10 "../../src/libs/actions/Policy/Policy.ts" "rulesdir/no-onyx-connect" 3 "../../src/libs/actions/Policy/ReportField.ts" "no-restricted-syntax" 4 @@ -283,22 +388,29 @@ "../../src/libs/actions/ReimbursementAccount/resetNonUSDBankAccount.ts" "no-restricted-syntax" 1 "../../src/libs/actions/ReimbursementAccount/resetUSDBankAccount.ts" "no-restricted-syntax" 1 "../../src/libs/actions/Report/MarkAllMessageAsRead.tsx" "no-restricted-syntax" 1 +"../../src/libs/actions/Report/index.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 +"../../src/libs/actions/Report/index.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 3 +"../../src/libs/actions/Report/index.ts" "@typescript-eslint/no-deprecated/reportAction.originalMessage" 1 "../../src/libs/actions/Report/index.ts" "no-restricted-syntax" 11 "../../src/libs/actions/Report/index.ts" "rulesdir/no-onyx-connect" 4 "../../src/libs/actions/ReportLayout.ts" "no-restricted-syntax" 1 "../../src/libs/actions/ScheduleCall.ts" "no-restricted-syntax" 1 "../../src/libs/actions/Search.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/Session/index.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/Session/index.ts" "no-restricted-syntax" 9 "../../src/libs/actions/Session/index.ts" "rulesdir/no-onyx-connect" 2 "../../src/libs/actions/StatsCounter.ts" "no-restricted-syntax" 2 "../../src/libs/actions/Subscription.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/Task.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/Task.ts" "no-restricted-syntax" 7 "../../src/libs/actions/TaxRate.ts" "no-restricted-syntax" 1 "../../src/libs/actions/TeachersUnite.ts" "no-restricted-syntax" 1 +"../../src/libs/actions/Transaction.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 2 "../../src/libs/actions/Transaction.ts" "no-restricted-syntax" 3 "../../src/libs/actions/Transaction.ts" "rulesdir/no-onyx-connect" 3 "../../src/libs/actions/Travel.ts" "no-restricted-syntax" 1 "../../src/libs/actions/TravelInvoicing.ts" "no-restricted-syntax" 3 +"../../src/libs/actions/TwoFactorAuthActions.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/actions/UnreportedExpenses.tsx" "no-restricted-syntax" 1 "../../src/libs/actions/User.ts" "no-restricted-syntax" 8 "../../src/libs/actions/User.ts" "rulesdir/no-onyx-connect" 1 @@ -316,15 +428,22 @@ "../../src/libs/actions/connections/Xero.ts" "no-restricted-syntax" 2 "../../src/libs/actions/connections/index.ts" "no-restricted-syntax" 3 "../../src/libs/actions/getCompanyCardBankConnection/index.tsx" "no-restricted-syntax" 2 +"../../src/libs/actions/replaceOptimisticReportWithActualReport.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/canFocusInputOnScreenFocus/index.ts" "no-restricted-syntax" 1 "../../src/libs/fileDownload/DownloadUtils.ts" "no-restricted-syntax" 2 +"../../src/libs/fileDownload/getImageManipulator/index.native.ts" "@typescript-eslint/no-deprecated/manipulateAsync" 1 +"../../src/libs/fileDownload/getImageManipulator/index.ts" "@typescript-eslint/no-deprecated/manipulateAsync" 1 "../../src/libs/focusComposerWithDelay/index.ts" "no-restricted-syntax" 1 +"../../src/libs/focusEditAfterCancelDelete/index.native.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/libs/getPlatform/index.ts" "no-restricted-syntax" 1 "../../src/libs/interceptAnonymousUser.ts" "no-restricted-syntax" 1 "../../src/libs/setShouldShowComposeInputKeyboardAware/index.ts" "no-restricted-syntax" 1 "../../src/libs/setShouldShowComposeInputKeyboardAware/setShouldShowComposeInputKeyboardAwareBuilder.ts" "no-restricted-syntax" 1 "../../src/pages/AddressPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/Debug/ReportAction/DebugReportActionPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/Debug/Transaction/DebugTransactionPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/Debug/Transaction/DebugTransactionViolations.tsx" "no-restricted-syntax" 1 +"../../src/pages/Debug/TransactionViolation/DebugTransactionViolationPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/DynamicReportChangeApproverPage.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/EnablePayments/FeesAndTerms/FeesAndTerms.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 @@ -333,91 +452,143 @@ "../../src/pages/EnablePayments/FeesAndTerms/substeps/TermsStep.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/EnablePayments/PersonalInfo/PersonalInfo.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/MissingPersonalDetails/subPages/Address.tsx" "react-hooks/refs" 4 +"../../src/pages/MultifactorAuthentication/BiometricsTestPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/MultifactorAuthentication/ValidateCodePage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx" "react-hooks/preserve-manual-memoization" 2 "../../src/pages/ReimbursementAccount/EnterSignerInfo/index.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx" "react-hooks/refs" 3 "../../src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx" "react-hooks/set-state-in-effect" 4 +"../../src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 +"../../src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/subSteps/BeneficialOwnerDetailsFormSubSteps/ConfirmationUBO.tsx" "no-restricted-syntax" 1 +"../../src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IndustryCode/IndustryCodeSelector.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 +"../../src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/ReportDescriptionPage.tsx" "no-restricted-syntax" 1 +"../../src/pages/ReportDetailsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/ReportDetailsPage.tsx" "react-hooks/preserve-manual-memoization" 4 +"../../src/pages/ReportParticipantsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/ReportParticipantsPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/RoomMembersPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/RoomMembersPage.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/pages/RoomMembersPage.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/ScheduleCall/ScheduleCallPage.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersCardPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/Search/SearchMoneyRequestReportPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/Search/SearchPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/Search/SearchTransactionsChangeReport.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/Share/ShareRootPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/TransactionDuplicate/Confirmation.tsx" "react-hooks/refs" 12 "../../src/pages/Travel/TravelUpgrade.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/ValidateLoginPage/index.website.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/inbox/DeleteTransactionNavigateBackHandler.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/inbox/ReportFetchHandler.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 "../../src/pages/inbox/ReportNavigateAwayHandler.tsx" "react-hooks/exhaustive-deps" 1 "../../src/pages/inbox/hooks/useReportWasDeleted.ts" "react-hooks/set-state-in-effect" 1 +"../../src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx" "react-hooks/refs" 1 +"../../src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx" "@typescript-eslint/no-deprecated/getReportNameDeprecated" 1 +"../../src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx" "react-hooks/refs" 30 "../../src/pages/inbox/report/ListBoundaryLoader.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/inbox/report/PureReportActionItem.tsx" "react-hooks/refs" 2 "../../src/pages/inbox/report/PureReportActionItem.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/inbox/report/ReactionList/HeaderReactionList.tsx" "no-restricted-syntax" 1 +"../../src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx" "react-hooks/preserve-manual-memoization" 2 "../../src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx" "react-hooks/refs" 8 "../../src/pages/inbox/report/ReportActionCompose/SuggestionEmoji.tsx" "react-hooks/refs" 1 "../../src/pages/inbox/report/ReportActionCompose/SuggestionMention.tsx" "react-hooks/refs" 3 +"../../src/pages/inbox/report/ReportActionItemMessage.tsx" "@typescript-eslint/no-deprecated/getReportName" 1 +"../../src/pages/inbox/report/ReportActionItemMessageEdit.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/pages/inbox/report/ReportActionItemMessageEdit.tsx" "no-restricted-syntax" 1 "../../src/pages/inbox/report/ReportActionItemMessageEdit.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/pages/inbox/report/ReportActionItemMessageEdit.tsx" "react-hooks/refs" 6 "../../src/pages/inbox/report/ReportActionItemMessageEdit.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/inbox/report/ReportActionsList.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 5 "../../src/pages/inbox/report/ReportActionsList.tsx" "react-hooks/refs" 7 "../../src/pages/inbox/report/ReportActionsList.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/inbox/report/ReportActionsView.tsx" "react-hooks/globals" 1 "../../src/pages/inbox/report/ReportActionsView.tsx" "react-hooks/preserve-manual-memoization" 1 "../../src/pages/inbox/report/TripSummary.tsx" "rulesdir/no-default-id-values" 1 +"../../src/pages/inbox/report/UserTypingEventListener.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 4 "../../src/pages/inbox/report/shouldUseEmojiPickerSelection/index.website.ts" "no-restricted-syntax" 1 "../../src/pages/inbox/report/withReportOrNotFound.tsx" "react-hooks/refs" 3 "../../src/pages/inbox/sidebar/SidebarLinksData.tsx" "react-hooks/refs" 1 "../../src/pages/iou/MoneyRequestAmountForm.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/iou/SplitExpenseEditPage.tsx" "react-hooks/preserve-manual-memoization" 3 +"../../src/pages/iou/SplitExpensePage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/SplitExpensePage.tsx" "react-hooks/set-state-in-effect" 3 +"../../src/pages/iou/request/ParticipantSearchResults.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepAmount.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/iou/request/step/IOURequestStepCategory.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepConfirmation.tsx" "react-hooks/preserve-manual-memoization" 1 +"../../src/pages/iou/request/step/IOURequestStepDescription.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/iou/request/step/IOURequestStepDestination.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepDistance.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/iou/request/step/IOURequestStepDistanceMap.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/iou/request/step/IOURequestStepMerchant.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/iou/request/step/IOURequestStepReport.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 +"../../src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/iou/request/step/IOURequestStepScan/components/MobileWebCameraView.tsx" "react-hooks/immutability" 1 +"../../src/pages/iou/request/step/IOURequestStepScan/hooks/useMobileReceiptScan.ts" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/iou/request/step/IOURequestStepSubrate.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/iou/request/step/IOURequestStepSubrate.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/media/AttachmentModalScreen/AttachmentModalBaseContent/index.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/media/AttachmentModalScreen/routes/TransactionReceiptModalContent.tsx" "react-hooks/set-state-in-effect" 2 "../../src/pages/media/AttachmentModalScreen/routes/hooks/useReportAttachmentModalType.ts" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/AboutPage/AboutPage.tsx" "react-hooks/refs" 1 "../../src/pages/settings/PaymentCard/ChangeCurrency/index.tsx" "no-restricted-syntax" 1 +"../../src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 "../../src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx" "react-hooks/refs" 3 "../../src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/settings/Profile/CustomStatus/StatusPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 7 "../../src/pages/settings/Profile/CustomStatus/StatusPage.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Profile/PronounsPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 3 +"../../src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/settings/Security/MergeAccounts/MergeResultPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/settings/Subscription/CardAuthenticationModal/index.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Subscription/PaymentCard/ChangeBillingCurrency/index.tsx" "no-restricted-syntax" 1 "../../src/pages/settings/Subscription/SubscriptionPlan/ComparePlansModal.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/PersonalInfo.tsx" "@typescript-eslint/no-deprecated/useSubStep" 1 "../../src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/substeps/AddressStep.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Wallet/PersonalCards/steps/SelectCountryStep.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Wallet/ShareBankAccount/ShareBankAccount.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Wallet/UnshareBankAccount/UnshareBankAccount.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/settings/Wallet/WalletPage/index.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/signin/LoginForm/BaseLoginForm.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/signin/SignInPage.tsx" "react-hooks/refs" 2 "../../src/pages/signin/SignInPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/signin/SignInPageLayout/BackgroundImage/index.native.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.tsx" "react-hooks/set-state-in-effect" 4 +"../../src/pages/tasks/NewTaskPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/tasks/TaskAssigneeSelectorModal.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/pages/workspace/DynamicWorkspaceOverviewPlanTypePage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/WorkspaceMembersPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/WorkspaceMembersPage.tsx" "react-hooks/exhaustive-deps" 1 "../../src/pages/workspace/WorkspaceMembersPage.tsx" "react-hooks/refs" 1 +"../../src/pages/workspace/WorkspaceNewRoomPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/WorkspaceNewRoomPage.tsx" "react-hooks/set-state-in-effect" 3 "../../src/pages/workspace/WorkspacePageWithSections.tsx" "react-hooks/refs" 5 +"../../src/pages/workspace/WorkspacesListPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/WorkspacesListPage.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/workspace/accounting/PolicyAccountingPage.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/workspace/accounting/intacct/import/SageIntacctAddUserDimensionPage.tsx" "no-restricted-syntax" 1 "../../src/pages/workspace/accounting/intacct/import/SageIntacctAddUserDimensionPage.tsx" "rulesdir/no-default-id-values" 1 "../../src/pages/workspace/accounting/intacct/import/SageIntacctToggleMappingsPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomListContent.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomSegmentContent.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomersOrProjectsPage.tsx" "no-restricted-syntax" 2 "../../src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomersOrProjectsPage.tsx" "rulesdir/no-default-id-values" 1 "../../src/pages/workspace/accounting/qbd/QuickBooksDesktopSetupFlowSyncPage.tsx" "rulesdir/no-default-id-values" 2 @@ -450,24 +621,39 @@ "../../src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx" "no-restricted-syntax" 3 "../../src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx" "rulesdir/no-default-id-values" 1 "../../src/pages/workspace/categories/CategorySettingsPage.tsx" "react-hooks/preserve-manual-memoization" 1 +"../../src/pages/workspace/categories/WorkspaceCategoriesPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/categories/WorkspaceCategoriesPage.tsx" "react-hooks/set-state-in-effect" 2 "../../src/pages/workspace/companyCards/BankConnection/index.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/companyCards/WorkspaceVerifyWorkAccountPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/workspace/companyCards/assignCard/ConfirmationStep.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx" "react-hooks/preserve-manual-memoization" 2 +"../../src/pages/workspace/downgrade/WorkspaceDowngradePage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/pages/workspace/duplicate/WorkspaceDuplicateSelectFeaturesForm.tsx" "react-hooks/preserve-manual-memoization" 2 "../../src/pages/workspace/duplicate/WorkspaceDuplicateSelectFeaturesForm.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/members/ImportMembersPage.tsx" "no-restricted-syntax" 1 "../../src/pages/workspace/members/ImportMembersPage.tsx" "rulesdir/no-default-id-values" 1 "../../src/pages/workspace/members/ImportedMembersConfirmationPage.tsx" "react-hooks/refs" 7 +"../../src/pages/workspace/members/ImportedMembersPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx" "react-hooks/set-state-in-effect" 1 "../../src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx" "react-hooks/refs" 2 "../../src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx" "react-hooks/refs" 2 "../../src/pages/workspace/members/WorkspaceOwnerPaymentCardForm.tsx" "react-hooks/set-state-in-effect" 2 +"../../src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/reports/ReportFieldsListValuesPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/workspace/tags/WorkspaceTagsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/tags/WorkspaceTagsPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/tags/WorkspaceViewTagsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 +"../../src/pages/workspace/taxes/WorkspaceTaxesPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/taxes/WorkspaceTaxesPage.tsx" "react-hooks/set-state-in-effect" 1 +"../../src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 1 "../../src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx" "react-hooks/preserve-manual-memoization" 3 +"../../src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx" "@typescript-eslint/no-deprecated/InteractionManager.runAfterInteractions" 2 "../../src/stories/ReportActionItemImages.stories.tsx" "no-restricted-syntax" 1 "../../src/stories/TextInput.stories.tsx" "react-hooks/set-state-in-effect" 1 "../../src/styles/utils/autoCompleteSuggestion/index.website.ts" "no-restricted-syntax" 1 @@ -519,4 +705,9 @@ "../../src/types/onyx/WalletOnfido.ts" "no-restricted-syntax" 1 "../../src/types/onyx/WalletTerms.ts" "no-restricted-syntax" 1 "../../src/types/onyx/WalletTransfer.ts" "no-restricted-syntax" 1 +"../../tests/actions/ReportTest.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 1 +"../../tests/perf-test/ReportUtils.perf-test.ts" "@typescript-eslint/no-deprecated/getReportName" 1 +"../../tests/unit/NextStepUtilsTest.ts" "@typescript-eslint/no-deprecated/buildNextStepNew" 23 +"../../tests/unit/ReportUtilsTest.ts" "@typescript-eslint/no-deprecated/getReportNameDeprecated" 6 +"../../tests/unit/canEditFieldOfMoneyRequestTest.ts" "@typescript-eslint/no-deprecated/randomReportAction.originalMessage" 3 "../../tests/unit/useSubStepTest.tsx" "@typescript-eslint/no-deprecated/useSubStep" 13 diff --git a/scripts/utils/OpenAIUtils.ts b/scripts/utils/OpenAIUtils.ts index 4f2803a5000e..1a21def8b73c 100644 --- a/scripts/utils/OpenAIUtils.ts +++ b/scripts/utils/OpenAIUtils.ts @@ -100,7 +100,6 @@ class OpenAIUtils { // 1. Create a thread const thread = await retryWithBackoff( () => - // eslint-disable-next-line @typescript-eslint/no-deprecated this.client.beta.threads.create({ messages: [{role: OpenAIUtils.USER, content: userMessage}], }), @@ -110,7 +109,6 @@ class OpenAIUtils { // 2. Create a run on the thread let run = await retryWithBackoff( () => - // eslint-disable-next-line @typescript-eslint/no-deprecated this.client.beta.threads.runs.create(thread.id, { // eslint-disable-next-line @typescript-eslint/naming-convention assistant_id: assistantID, @@ -122,7 +120,7 @@ class OpenAIUtils { let response = ''; let count = 0; while (!response && count < OpenAIUtils.MAX_POLL_COUNT) { - // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-deprecated + // eslint-disable-next-line @typescript-eslint/naming-convention run = await this.client.beta.threads.runs.retrieve(run.id, {thread_id: thread.id}); if (run.status !== OpenAIUtils.OPENAI_RUN_COMPLETED) { count++; @@ -132,7 +130,6 @@ class OpenAIUtils { continue; } - // eslint-disable-next-line @typescript-eslint/no-deprecated for await (const message of this.client.beta.threads.messages.list(thread.id)) { if (message.role !== OpenAIUtils.ASSISTANT) { continue; diff --git a/src/components/ActionSheetAwareScrollView/useActionSheetKeyboardSpacing.ts b/src/components/ActionSheetAwareScrollView/useActionSheetKeyboardSpacing.ts index fa6ce65ccfea..2204b92dcac7 100644 --- a/src/components/ActionSheetAwareScrollView/useActionSheetKeyboardSpacing.ts +++ b/src/components/ActionSheetAwareScrollView/useActionSheetKeyboardSpacing.ts @@ -98,7 +98,6 @@ function useActionSheetKeyboardSpacing(scrollViewAnimatedRef: AnimatedRef { const {current, previous} = currentActionSheetState.get(); diff --git a/src/components/AddExistingExpenseFooter.tsx b/src/components/AddExistingExpenseFooter.tsx index 1a4fe69a764a..14ee72779818 100644 --- a/src/components/AddExistingExpenseFooter.tsx +++ b/src/components/AddExistingExpenseFooter.tsx @@ -68,7 +68,6 @@ function AddExistingExpenseFooter({selectedIds, report, reportToConfirm, reportN } Navigation.dismissToSuperWideRHP(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (report && isIOUReport(report)) { convertBulkTrackedExpensesToIOU({ diff --git a/src/components/AnimatedFlatListWithCellRenderer.tsx b/src/components/AnimatedFlatListWithCellRenderer.tsx index 18b2df749402..9d73559d06b2 100644 --- a/src/components/AnimatedFlatListWithCellRenderer.tsx +++ b/src/components/AnimatedFlatListWithCellRenderer.tsx @@ -10,7 +10,6 @@ import {FlatList} from 'react-native'; import type {AnimatedProps, ILayoutAnimationBuilder} from 'react-native-reanimated'; import Animated, {LayoutAnimationConfig} from 'react-native-reanimated'; -// eslint-disable-next-line @typescript-eslint/no-deprecated const AnimatedFlatList = Animated.createAnimatedComponent(FlatList); type CellRendererComponentProps = React.ComponentType> | null | undefined; diff --git a/src/components/AutoSubmitModal.tsx b/src/components/AutoSubmitModal.tsx index c01e4e2dea43..2404be3c09d9 100644 --- a/src/components/AutoSubmitModal.tsx +++ b/src/components/AutoSubmitModal.tsx @@ -39,7 +39,6 @@ function AutoSubmitModal() { ); const onClose = useCallback((willShowAgain: boolean) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (!willShowAgain) { dismissASAPSubmitExplanation(true); diff --git a/src/components/AvatarCropModal/AvatarCropModal.tsx b/src/components/AvatarCropModal/AvatarCropModal.tsx index 4c588d95de97..158e41ba1176 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.tsx +++ b/src/components/AvatarCropModal/AvatarCropModal.tsx @@ -325,7 +325,6 @@ function AvatarCropModal({imageUri = '', imageName = '', imageType = '', onClose cropOrRotateImage(imageUri, [{rotate: rotation.get() % 360}, {crop}], {compress: 1, name, type}) .then((newImage) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { onClose?.(); }); diff --git a/src/components/ContactPermissionModal/index.native.tsx b/src/components/ContactPermissionModal/index.native.tsx index b67628bee433..6bc3bcf872ab 100644 --- a/src/components/ContactPermissionModal/index.native.tsx +++ b/src/components/ContactPermissionModal/index.native.tsx @@ -38,7 +38,6 @@ function ContactPermissionModal({onDeny, onGrant, onFocusTextInput}: ContactPerm const handleGrantPermission = () => { setIsModalVisible(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestContactPermission().then((status) => { onFocusTextInput(); @@ -56,7 +55,6 @@ function ContactPermissionModal({onDeny, onGrant, onFocusTextInput}: ContactPerm onDeny(RESULTS.DENIED); // Sometimes, the input gains focus when the modal closes, but the keyboard doesn't appear. // To fix this, we need to call the focus function after the modal has finished closing. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { onFocusTextInput(); }); diff --git a/src/components/DatePicker/index.tsx b/src/components/DatePicker/index.tsx index ea312896e2ef..39dd7e675d80 100644 --- a/src/components/DatePicker/index.tsx +++ b/src/components/DatePicker/index.tsx @@ -103,7 +103,6 @@ function DatePicker({ }; useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { calculatePopoverPosition(); }); diff --git a/src/components/FeatureTrainingModal.tsx b/src/components/FeatureTrainingModal.tsx index 3c3fea6df87e..d43b71e5b72d 100644 --- a/src/components/FeatureTrainingModal.tsx +++ b/src/components/FeatureTrainingModal.tsx @@ -234,7 +234,6 @@ function FeatureTrainingModal({ const shouldUseScrollView = shouldUseScrollViewProp || isInLandscapeMode; useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (!isModalDisabled) { setIsModalVisible(false); @@ -348,7 +347,6 @@ function FeatureTrainingModal({ Log.hmmm('[FeatureTrainingModal] Setting modal invisible'); setIsModalVisible(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Log.hmmm(`[FeatureTrainingModal] Running after interactions - shouldGoBack: ${shouldGoBack}, hasOnClose: ${!!onClose}`); diff --git a/src/components/Form/FormProvider.tsx b/src/components/Form/FormProvider.tsx index 059a1dcb6f12..6853ae849742 100644 --- a/src/components/Form/FormProvider.tsx +++ b/src/components/Form/FormProvider.tsx @@ -466,7 +466,6 @@ function FormProvider({ } inputProps.onBlur?.(event); if (isSafari()) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setIsBlurred(true); }); diff --git a/src/components/Form/FormWrapper.tsx b/src/components/Form/FormWrapper.tsx index 95a1441eee48..2efa97ebbc9c 100644 --- a/src/components/Form/FormWrapper.tsx +++ b/src/components/Form/FormWrapper.tsx @@ -223,7 +223,6 @@ function FormWrapper({ if (!shouldScrollToEnd) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { formRef.current?.scrollToEnd({animated: true}); diff --git a/src/components/Lottie/index.tsx b/src/components/Lottie/index.tsx index 8911c56181c9..4e76b8b19bd6 100644 --- a/src/components/Lottie/index.tsx +++ b/src/components/Lottie/index.tsx @@ -41,7 +41,6 @@ function Lottie({source, webStyle, shouldLoadAfterInteractions, ...props}: Props return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated const interactionTask = InteractionManager.runAfterInteractions(() => { setIsInteractionComplete(true); }); diff --git a/src/components/Modal/ReanimatedModal/index.tsx b/src/components/Modal/ReanimatedModal/index.tsx index a3ceeff1d4f9..b6d73936ee9a 100644 --- a/src/components/Modal/ReanimatedModal/index.tsx +++ b/src/components/Modal/ReanimatedModal/index.tsx @@ -106,7 +106,6 @@ function ReanimatedModal({ useEffect( () => () => { if (handleRef.current) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.clearInteractionHandle(handleRef.current); } if (transitionHandleRef.current) { @@ -123,7 +122,6 @@ function ReanimatedModal({ useEffect(() => { if (isVisible && !isContainerOpen && !isTransitioning) { - // eslint-disable-next-line @typescript-eslint/no-deprecated handleRef.current = InteractionManager.createInteractionHandle(); transitionHandleRef.current = TransitionTracker.startTransition(); onModalWillShow(); @@ -131,7 +129,6 @@ function ReanimatedModal({ setIsVisibleState(true); setIsTransitioning(true); } else if (!isVisible && isContainerOpen && !isTransitioning) { - // eslint-disable-next-line @typescript-eslint/no-deprecated handleRef.current = InteractionManager.createInteractionHandle(); transitionHandleRef.current = TransitionTracker.startTransition(); onModalWillHide(); @@ -151,7 +148,6 @@ function ReanimatedModal({ setIsTransitioning(false); setIsContainerOpen(true); if (handleRef.current) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.clearInteractionHandle(handleRef.current); } if (transitionHandleRef.current) { @@ -165,7 +161,6 @@ function ReanimatedModal({ setIsTransitioning(false); setIsContainerOpen(false); if (handleRef.current) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.clearInteractionHandle(handleRef.current); } if (transitionHandleRef.current) { diff --git a/src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx b/src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx index f2e89e520225..e0a17561162e 100644 --- a/src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx +++ b/src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx @@ -153,7 +153,6 @@ function MoneyReportHeaderSecondaryActionsInner({reportID, primaryAction, isRepo }; if (getPlatform() === CONST.PLATFORM.IOS) { // InteractionManager delays modal until current interaction completes, preventing visual glitches on iOS - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => openHoldMenu(holdMenuParams)); } else { openHoldMenu(holdMenuParams); diff --git a/src/components/MoneyReportHeaderModals.tsx b/src/components/MoneyReportHeaderModals.tsx index 755a2ed7aed4..87bcc9959def 100644 --- a/src/components/MoneyReportHeaderModals.tsx +++ b/src/components/MoneyReportHeaderModals.tsx @@ -87,7 +87,6 @@ function MoneyReportHeaderModals({reportID, children}: MoneyReportHeaderModalsPr // On iOS, delay opening the hold menu until active touch interactions finish to prevent visual glitches if (getPlatform() === CONST.PLATFORM.IOS) { return new Promise((resolve) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated -- InteractionManager is widely used across the codebase (120+ files) and kept alive via a dedicated RN patch InteractionManager.runAfterInteractions(() => { open().then(() => resolve()); }); diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index a747a4824d27..df6eb06e1062 100644 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -444,7 +444,6 @@ function MoneyRequestConfirmationList({ useFocusEffect( useCallback(() => { focusTimeoutRef.current = setTimeout(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { blurActiveElement(); }); diff --git a/src/components/MoneyRequestHeaderSecondaryActions.tsx b/src/components/MoneyRequestHeaderSecondaryActions.tsx index 3aa6de5f9c70..814201b18e25 100644 --- a/src/components/MoneyRequestHeaderSecondaryActions.tsx +++ b/src/components/MoneyRequestHeaderSecondaryActions.tsx @@ -439,7 +439,6 @@ function MoneyRequestHeaderSecondaryActions({reportID, onBackButtonPress}: Money currentUserEmail: currentUserLogin ?? '', }); } else { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteTransactions([transaction.transactionID], duplicateTransactions, duplicateTransactionViolations, isReportInSearch ? currentSearchHash : undefined, true); removeTransaction(transaction.transactionID); diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx index 51e833232bc7..00a2a7f57937 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx @@ -282,7 +282,6 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps) isBackfillingRef.current = true; prevBackfillCursorRef.current = cursor; - // eslint-disable-next-line @typescript-eslint/no-deprecated const handle = InteractionManager.runAfterInteractions(() => getOlderActions(reportID, cursor)); return () => handle.cancel(); @@ -304,7 +303,6 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps) return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => requestAnimationFrame(() => loadOlderChats(false))); }, [loadOlderChats]); @@ -504,7 +502,6 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps) const scrollToBottomForCurrentUserAction = useCallback( (isFromCurrentUser: boolean, reportAction?: OnyxTypes.ReportAction) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setIsFloatingMessageCounterVisible(false); // If a new comment is added from the current user, scroll to the bottom, otherwise leave the user position unchanged diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx index 6f40fae7d5b0..1f55b2972f14 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx @@ -144,7 +144,6 @@ function MoneyRequestReportView({report, reportLoadingState, shouldDisplayReport const isLoadingInitialReportActions = reportLoadingState?.isLoadingInitialReportActions; const dismissReportCreationError = useCallback(() => { goBackFromSearchMoneyRequest(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeFailedReport(reportID)); }, [reportID]); diff --git a/src/components/OptionRow.tsx b/src/components/OptionRow.tsx index e084e037bc02..9c3412953d91 100644 --- a/src/components/OptionRow.tsx +++ b/src/components/OptionRow.tsx @@ -179,7 +179,6 @@ function OptionRow({ result = Promise.resolve(); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { result?.finally(() => setIsDisabled(isOptionDisabled)); }); diff --git a/src/components/Reactions/ReportActionItemEmojiReactions.tsx b/src/components/Reactions/ReportActionItemEmojiReactions.tsx index c1436ba919ca..9e549a8e8415 100644 --- a/src/components/Reactions/ReportActionItemEmojiReactions.tsx +++ b/src/components/Reactions/ReportActionItemEmojiReactions.tsx @@ -80,7 +80,6 @@ function ReportActionItemEmojiReactions({reportAction, reportID, shouldBlockReac if (isAnonymousUser()) { hideContextMenu(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { signOutAndRedirectToSignIn(); }); diff --git a/src/components/Search/SearchRouter/SearchRouter.tsx b/src/components/Search/SearchRouter/SearchRouter.tsx index eb376db35418..c366320b2fa5 100644 --- a/src/components/Search/SearchRouter/SearchRouter.tsx +++ b/src/components/Search/SearchRouter/SearchRouter.tsx @@ -277,7 +277,6 @@ function SearchRouter({onRouterClose, shouldHideInputCaret, isSearchRouterDispla const onListItemPress = useCallback( (item: OptionData | SearchQueryItem) => { const setFocusAndScrollToRight = () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (!textInputRef.current) { return; diff --git a/src/components/TestDrive/Modal/AdminTestDriveModal.tsx b/src/components/TestDrive/Modal/AdminTestDriveModal.tsx index 83c92d54179e..97284f00f7b0 100644 --- a/src/components/TestDrive/Modal/AdminTestDriveModal.tsx +++ b/src/components/TestDrive/Modal/AdminTestDriveModal.tsx @@ -18,7 +18,6 @@ function AdminTestDriveModal() { const navigate = () => { Log.hmmm('[AdminTestDriveModal] Navigate function called'); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Log.hmmm('[AdminTestDriveModal] Calling Navigation.navigate()'); Navigation.navigate(ROUTES.TEST_DRIVE_DEMO_ROOT); diff --git a/src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx b/src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx index 1c34e9836369..3cfc5a7e7449 100644 --- a/src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx +++ b/src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx @@ -101,7 +101,6 @@ function EmployeeTestDriveModal() { Log.hmmm('[EmployeeTestDriveModal] Running after interactions'); Navigation.goBack(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Log.hmmm('[EmployeeTestDriveModal] Calling Navigation.goBack() and Navigation.navigate()'); Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE, CONST.IOU.TYPE.SUBMIT, transactionID, reportID)); diff --git a/src/components/TestDrive/TestDriveDemo.tsx b/src/components/TestDrive/TestDriveDemo.tsx index b26ab83bf00a..380f024f1a5b 100644 --- a/src/components/TestDrive/TestDriveDemo.tsx +++ b/src/components/TestDrive/TestDriveDemo.tsx @@ -93,7 +93,6 @@ function TestDriveDemo() { ]); useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setIsVisible(true); }); @@ -101,7 +100,6 @@ function TestDriveDemo() { const closeModal = useCallback(() => { setIsVisible(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.goBack(); diff --git a/src/components/WalletStatementModal/index.tsx b/src/components/WalletStatementModal/index.tsx index 8e45f9b162d9..39880fa0b5d0 100644 --- a/src/components/WalletStatementModal/index.tsx +++ b/src/components/WalletStatementModal/index.tsx @@ -46,7 +46,6 @@ function WalletStatementModal({statementPageURL}: WalletStatementProps) { height="100%" width="100%" seamless - // eslint-disable-next-line @typescript-eslint/no-deprecated frameBorder="0" onLoad={() => { setIsLoading(false); diff --git a/src/hooks/useAutoFocusInput.ts b/src/hooks/useAutoFocusInput.ts index 657bb606ea8a..c1a37c88931c 100644 --- a/src/hooks/useAutoFocusInput.ts +++ b/src/hooks/useAutoFocusInput.ts @@ -64,7 +64,6 @@ export default function useAutoFocusInput(isMultiline = false): UseAutoFocusInpu ) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated const focusTaskHandle = InteractionManager.runAfterInteractions(() => { if (inputRef.current && isMultiline) { moveSelectionToEnd(inputRef.current); diff --git a/src/hooks/useDialogContainerFocus/index.ts b/src/hooks/useDialogContainerFocus/index.ts index 08a101d8bfd5..90a3b40bab8e 100644 --- a/src/hooks/useDialogContainerFocus/index.ts +++ b/src/hooks/useDialogContainerFocus/index.ts @@ -52,7 +52,6 @@ const useDialogContainerFocus: UseDialogContainerFocus = (ref, isReady, claimIni let cancelled = false; let frameId: number; // Deferred past useAutoFocusInput's InteractionManager + Promise chain. - // eslint-disable-next-line @typescript-eslint/no-deprecated const interactionHandle = InteractionManager.runAfterInteractions(() => { if (cancelled) { return; diff --git a/src/hooks/useExpenseActions.ts b/src/hooks/useExpenseActions.ts index cfcc11cc7a11..d2e664716ef2 100644 --- a/src/hooks/useExpenseActions.ts +++ b/src/hooks/useExpenseActions.ts @@ -381,7 +381,6 @@ function useExpenseActions({reportID, isReportInSearch = false, backTo, onDuplic const targetChatForDuplicate = isSourcePolicyValid ? chatReport : activePolicyExpenseChat; const activePolicyCategories = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${targetPolicyForDuplicate?.id}`] ?? {}; - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { duplicateReportAction({ sourceReport: moneyRequestReport, @@ -498,7 +497,6 @@ function useExpenseActions({reportID, isReportInSearch = false, backTo, onDuplic if (goBackRoute) { navigateOnDeleteExpense(goBackRoute); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteTransactions([transaction.transactionID], duplicateTransactions, duplicateTransactionViolations, isReportInSearch ? currentSearchHash : undefined, false); removeTransaction(transaction.transactionID); @@ -523,7 +521,6 @@ function useExpenseActions({reportID, isReportInSearch = false, backTo, onDuplic Navigation.setNavigationActionToMicrotaskQueue(() => { Navigation.goBack(backToRoute); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteAppReport({ report: moneyRequestReport, diff --git a/src/hooks/useFilesValidation.tsx b/src/hooks/useFilesValidation.tsx index b5a8379a5e8f..ed7e3793567b 100644 --- a/src/hooks/useFilesValidation.tsx +++ b/src/hooks/useFilesValidation.tsx @@ -109,7 +109,6 @@ function useFilesValidation(onFilesValidated: (files: FileObject[], dataTransfer const hideModalAndReset = () => { setIsErrorModalVisible(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { reset(); }); @@ -383,7 +382,6 @@ function useFilesValidation(onFilesValidated: (files: FileObject[], dataTransfer // the error modal is dismissed before opening the attachment modal if (isValidatingReceipts === false && fileError) { setIsErrorModalVisible(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (sortedFiles.length !== 0) { onFilesValidated(sortedFiles, dataTransferItemList.current); diff --git a/src/hooks/useOnboardingFlow.ts b/src/hooks/useOnboardingFlow.ts index 2841ff838e4e..5d03ecca0488 100644 --- a/src/hooks/useOnboardingFlow.ts +++ b/src/hooks/useOnboardingFlow.ts @@ -47,7 +47,6 @@ function useOnboardingFlowRouter() { useEffect(() => { // This should delay opening the onboarding modal so it does not interfere with the ongoing ReportScreen params changes - // eslint-disable-next-line @typescript-eslint/no-deprecated const handle = InteractionManager.runAfterInteractions(() => { // Prevent showing onboarding if we are logging in as a new user with short lived token if (currentUrl?.includes(ROUTES.TRANSITION_BETWEEN_APPS) && isLoggingInAsNewSessionUser) { diff --git a/src/hooks/useRestoreInputFocus/index.android.ts b/src/hooks/useRestoreInputFocus/index.android.ts index 57edff770e0c..61b6e489aaae 100644 --- a/src/hooks/useRestoreInputFocus/index.android.ts +++ b/src/hooks/useRestoreInputFocus/index.android.ts @@ -12,7 +12,6 @@ const useRestoreInputFocus = (isLostFocus: boolean) => { } if (!isLostFocus && keyboardVisibleBeforeLoosingFocusRef.current) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { KeyboardController.setFocusTo('current'); }); diff --git a/src/hooks/useSearchBulkActions.ts b/src/hooks/useSearchBulkActions.ts index 8d1dc4d426aa..4ec0c8d62eb4 100644 --- a/src/hooks/useSearchBulkActions.ts +++ b/src/hooks/useSearchBulkActions.ts @@ -528,7 +528,6 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { hash, reportIDList.filter((reportID) => reportID !== undefined), ); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearSelectedTransactions(); }); @@ -576,7 +575,6 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(async () => { const result = await showConfirmModal({ title: deleteModalTitle, @@ -589,7 +587,6 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { return; } const validTransactions = Object.fromEntries(Object.entries(allTransactions ?? {}).filter((entry): entry is [string, Transaction] => entry[1] !== undefined)); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (isExpenseReportType) { for (const reportID of selectedReportIDs) { @@ -767,7 +764,6 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { payMoneyRequestOnSearch(hash, paymentData); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearSelectedTransactions(); }); @@ -1320,7 +1316,6 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { currentUserPersonalDetails?.accountID, ); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearSelectedTransactions(); }); diff --git a/src/hooks/useSearchHighlightAndScroll.ts b/src/hooks/useSearchHighlightAndScroll.ts index b9d8c4e4c1fa..a5ad6c309b30 100644 --- a/src/hooks/useSearchHighlightAndScroll.ts +++ b/src/hooks/useSearchHighlightAndScroll.ts @@ -139,7 +139,6 @@ function useSearchHighlightAndScroll({ triggeredByHookRef.current = true; // Trigger the search - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { search({queryJSON, searchKey, offset, shouldCalculateTotals, isLoading: !!searchResults?.search?.isLoading}); }); diff --git a/src/hooks/useSearchSelector.native.ts b/src/hooks/useSearchSelector.native.ts index a88d0e4144dd..221f47595aff 100644 --- a/src/hooks/useSearchSelector.native.ts +++ b/src/hooks/useSearchSelector.native.ts @@ -24,7 +24,6 @@ function useSearchSelector(config: UseSearchSelectorConfig): UseSearchSelectorRe const initiateContactImportAndSetState = useCallback(() => { setContactPermissionState(RESULTS.GRANTED); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(importAndSaveContacts); }, [importAndSaveContacts, setContactPermissionState]); diff --git a/src/hooks/useSelectionModeReportActions.ts b/src/hooks/useSelectionModeReportActions.ts index 61be7b48e94a..bfde8b79fe1b 100644 --- a/src/hooks/useSelectionModeReportActions.ts +++ b/src/hooks/useSelectionModeReportActions.ts @@ -353,7 +353,6 @@ function useSelectionModeReportActions({ setSelectedVBBAToPayFromHoldMenu(type === CONST.IOU.PAYMENT_TYPE.VBBA ? methodID : undefined); if (getPlatform() === CONST.PLATFORM.IOS) { // On iOS, opening the hold menu immediately can conflict with the popover dismiss animation, so we defer it. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => setIsHoldMenuVisible(true)); } else { setIsHoldMenuVisible(true); @@ -432,7 +431,6 @@ function useSelectionModeReportActions({ } // This callback fires via onSubItemSelected before the popover closes. Defer heavy payment // work so the dropdown dismiss animation completes first, avoiding perceived UI lag. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { selectPaymentType({ event, diff --git a/src/hooks/useSingleExecution/index.native.ts b/src/hooks/useSingleExecution/index.native.ts index 69d0598a8813..d8aa1770d541 100644 --- a/src/hooks/useSingleExecution/index.native.ts +++ b/src/hooks/useSingleExecution/index.native.ts @@ -24,7 +24,6 @@ export default function useSingleExecution() { isExecutingRef.current = true; const execution = action(...params); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (!(execution instanceof Promise)) { setIsExecuting(false); diff --git a/src/libs/AttachmentModalHandler/index.ios.ts b/src/libs/AttachmentModalHandler/index.ios.ts index e1aabb445d3f..8bcbc92b7383 100644 --- a/src/libs/AttachmentModalHandler/index.ios.ts +++ b/src/libs/AttachmentModalHandler/index.ios.ts @@ -9,7 +9,6 @@ const attachmentModalHandler: AttachmentModalHandler = { // The issue is tracked in https://github.com/Expensify/App/issues/52937. // `InteractionManager.runAfterInteractions` ensures that `onCloseCallback` is executed only after all interactions and animations have completed, // preventing any unintended visual delay or jarring transition when the modal is closed. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { onCloseCallback?.(); }); diff --git a/src/libs/Clipboard/index.ts b/src/libs/Clipboard/index.ts index 6713d3eb82f3..ff8b66cca66e 100644 --- a/src/libs/Clipboard/index.ts +++ b/src/libs/Clipboard/index.ts @@ -75,7 +75,6 @@ function setHTMLSync(html: string, text: string) { selection.addRange(range); try { - // eslint-disable-next-line @typescript-eslint/no-deprecated document.execCommand('copy'); } catch (e) { // The 'copy' command can throw a SecurityError exception, we ignore this exception on purpose. diff --git a/src/libs/ComposerFocusManager.ts b/src/libs/ComposerFocusManager.ts index 5e392f2a5deb..2e8070693b14 100644 --- a/src/libs/ComposerFocusManager.ts +++ b/src/libs/ComposerFocusManager.ts @@ -35,7 +35,6 @@ const promiseMap = new Map(); * react-native-web doesn't support `currentlyFocusedInput`, so we need to make it compatible by using `currentlyFocusedField` instead. */ function getActiveInput() { - // eslint-disable-next-line @typescript-eslint/no-deprecated return (TextInput.State.currentlyFocusedInput ? TextInput.State.currentlyFocusedInput() : TextInput.State.currentlyFocusedField()) as InputElement; } diff --git a/src/libs/ErrorUtils.ts b/src/libs/ErrorUtils.ts index a8e38f4d659f..4e14ba868d3e 100644 --- a/src/libs/ErrorUtils.ts +++ b/src/libs/ErrorUtils.ts @@ -44,7 +44,6 @@ function getAuthenticateErrorMessage(response: Response { abandonReviewDuplicateTransactions(); }); @@ -243,7 +242,6 @@ function RightModalNavigator({navigation, route}: RightModalNavigatorProps) { component={ModalStackNavigators.TwoFactorAuthenticatorStackNavigator} listeners={{ beforeRemove: () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => clearTwoFactorAuthData(true)); }, }} diff --git a/src/libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab.ts b/src/libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab.ts index fde0dbe83c38..2309f7ed3034 100644 --- a/src/libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab.ts +++ b/src/libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab.ts @@ -63,7 +63,6 @@ function dismissModalAndOpenReportInInboxTab(reportID: string | undefined, isInv } Navigation.dismissModal(); if (hasActiveTracking) { - // eslint-disable-next-line @typescript-eslint/no-deprecated -- we need to wait for the modal to be dismissed before marking the span InteractionManager.runAfterInteractions(() => { endSubmitFollowUpActionSpan(CONST.TELEMETRY.SUBMIT_FOLLOW_UP_ACTION.DISMISS_MODAL_ONLY); }); diff --git a/src/libs/Navigation/navigateAfterInteraction/index.ios.ts b/src/libs/Navigation/navigateAfterInteraction/index.ios.ts index e9e7acfed833..b6bc68b0c250 100644 --- a/src/libs/Navigation/navigateAfterInteraction/index.ios.ts +++ b/src/libs/Navigation/navigateAfterInteraction/index.ios.ts @@ -7,7 +7,6 @@ import Navigation from '@libs/Navigation/Navigation'; * In this case we need to wait for the animation to be complete before executing the navigation */ function navigateAfterInteraction(callback: () => void) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.setNavigationActionToMicrotaskQueue(callback); }); diff --git a/src/libs/NextStepUtils.ts b/src/libs/NextStepUtils.ts index 52c308778257..4da56fc3b94c 100644 --- a/src/libs/NextStepUtils.ts +++ b/src/libs/NextStepUtils.ts @@ -389,7 +389,6 @@ function getReportNextStep( } if (shouldShowNoFurtherAction) { - // eslint-disable-next-line @typescript-eslint/no-deprecated -- The report header still consumes the deprecated nextStep shape, so we intentionally reuse the legacy builder here to override stale server nextStep data for $0 reports. return buildNextStepNew({ report: moneyRequestReport, policy, @@ -842,6 +841,5 @@ export { buildOptimisticNextStepForDynamicExternalWorkflowApproveError, buildOptimisticNextStepForDEWOffline, buildOptimisticNextStepForPreventSelfApprovalsEnabled, - // eslint-disable-next-line @typescript-eslint/no-deprecated buildNextStepNew, }; diff --git a/src/libs/Notification/LocalNotification/BrowserNotifications.ts b/src/libs/Notification/LocalNotification/BrowserNotifications.ts index 2327a7596405..5379bdd6acc5 100644 --- a/src/libs/Notification/LocalNotification/BrowserNotifications.ts +++ b/src/libs/Notification/LocalNotification/BrowserNotifications.ts @@ -150,7 +150,6 @@ export default { }: LocalNotificationModifiedExpensePushParams) { const title = reportAction.person?.map((f) => f.text).join(', ') ?? ''; const bodyWithHTML = getForReportAction({ - // eslint-disable-next-line @typescript-eslint/no-deprecated -- translateLocal is deprecated; BrowserNotifications is non-React code that cannot use the translate hook translate: translateLocal, reportAction, policy, diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index 187ebbcef864..c08f07c3849d 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -239,11 +239,9 @@ Onyx.connect({ if (!actions) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated deprecatedAllReportActions = actions ?? {}; // Iterate over the report actions to build the sorted report actions objects - // eslint-disable-next-line @typescript-eslint/no-deprecated for (const reportActions of Object.entries(deprecatedAllReportActions)) { const reportID = reportActions[0].split('_').at(1); if (!reportID) { @@ -252,7 +250,6 @@ Onyx.connect({ const reportActionsArray = Object.values(reportActions[1] ?? {}); let sortedReportActions = getSortedReportActions(withDEWRoutedActionsArray(reportActionsArray), true); - // eslint-disable-next-line @typescript-eslint/no-deprecated deprecatedAllSortedReportActions[reportID] = sortedReportActions; const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]; const chatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.chatReportID}`]; @@ -261,7 +258,6 @@ Onyx.connect({ // to the transaction thread or the report itself. // Cache the result for O(1) lookup in renderItem. const transactionThreadReportID = getOneTransactionThreadReportID(report, chatReport, actions[reportActions[0]]); - // eslint-disable-next-line @typescript-eslint/no-deprecated deprecatedCachedOneTransactionThreadReportIDs[reportID] = transactionThreadReportID; if (transactionThreadReportID) { @@ -271,10 +267,8 @@ Onyx.connect({ const firstReportAction = sortedReportActions.at(0); if (!firstReportAction) { - // eslint-disable-next-line @typescript-eslint/no-deprecated delete deprecatedLastReportActions[reportID]; } else { - // eslint-disable-next-line @typescript-eslint/no-deprecated deprecatedLastReportActions[reportID] = firstReportAction; } } @@ -394,8 +388,7 @@ function getLastActorDisplayName(lastActorDetails: Partial | nu return lastActorDetails.accountID !== currentUserAccountID ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing lastActorDetails.firstName || formatPhoneNumberPhoneUtils(getDisplayNameOrDefault(lastActorDetails)) - : // eslint-disable-next-line @typescript-eslint/no-deprecated - translateLocal('common.you'); + : translateLocal('common.you'); } function shouldShowLastActorDisplayName( @@ -456,7 +449,6 @@ function getAlternateText( const isAnnounceRoom = reportUtilsIsAnnounceRoom(report); const isGroupChat = reportUtilsIsGroupChat(report); const isExpenseThread = isMoneyRequest(report); - // eslint-disable-next-line @typescript-eslint/no-deprecated const translateFn = translate ?? translateLocal; const formattedLastMessageText = formatReportLastMessageText(Parser.htmlToText(option.lastMessageText ?? '')) || @@ -638,7 +630,6 @@ function getLastMessageTextForReport({ const canUserPerformWrite = canUserPerformWriteAction(report, isReportArchived); let lastReportAction = lastAction ?? getLastVisibleAction(reportID, canUserPerformWrite, {}, undefined, visibleReportActionsDataParam); - // eslint-disable-next-line @typescript-eslint/no-deprecated const transactionThreadReportID = reportID ? deprecatedCachedOneTransactionThreadReportIDs[reportID] : undefined; if (reportID && !lastAction && transactionThreadReportID) { @@ -669,7 +660,6 @@ function getLastMessageTextForReport({ } // some types of actions are filtered out for lastReportAction, in some cases we need to check the actual last action - // eslint-disable-next-line @typescript-eslint/no-deprecated const lastOriginalReportAction = reportID ? deprecatedLastReportActions[reportID] : undefined; let lastMessageTextFromReport = ''; @@ -703,7 +693,6 @@ function getLastMessageTextForReport({ const iouReportID = iouReport?.reportID; const reportCache = iouReportID ? visibleReportActionsDataParam?.[iouReportID] : undefined; const visibleReportActionsForIOUReport = reportCache && Object.keys(reportCache).length > 0 ? visibleReportActionsDataParam : undefined; - // eslint-disable-next-line @typescript-eslint/no-deprecated const iouReportActions = iouReportID ? deprecatedAllSortedReportActions[iouReportID] : undefined; const canPerformWrite = canUserPerformWriteAction(report, isReportArchived); const lastIOUMoneyReportAction = @@ -1091,7 +1080,6 @@ function createOption({ // If displaying chat preview line is needed, let's overwrite the default alternate text const lastActorDetails = personalDetails?.[report?.lastActorAccountID ?? String(CONST.DEFAULT_NUMBER_ID)] ?? {}; - // eslint-disable-next-line @typescript-eslint/no-deprecated const translateFn = translate ?? translateLocal; result.lastMessageText = getLastMessageTextForReport({ translate: translateFn, @@ -1196,15 +1184,12 @@ function getReportOption( // Update text & alternateText because createOption returns workspace name only if report is owned by the user if (option.isSelfDM) { - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('reportActionsView.yourSpace'); } else if (option.isInvoiceRoom) { option.text = getReportName(report, reportAttributesDerived); - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('workspace.common.invoices'); } else { option.text = getPolicyName({report}); - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('workspace.common.workspace'); if (report?.policyID) { @@ -1213,7 +1198,6 @@ function getReportOption( const subtitle = submitsToAccountDetails?.displayName ?? submitsToAccountDetails?.login; if (subtitle) { - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('iou.submitsTo', subtitle ?? ''); } } @@ -1257,11 +1241,9 @@ function getReportDisplayOption( // Update text & alternateText because createOption returns workspace name only if report is owned by the user if (option.isSelfDM) { - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('reportActionsView.yourSpace'); } else if (option.isInvoiceRoom) { option.text = getReportName(report, reportAttributesDerived); - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('workspace.common.invoices'); } else if (unknownUserDetails) { option.text = unknownUserDetails.text ?? unknownUserDetails.login; @@ -1269,7 +1251,6 @@ function getReportDisplayOption( option.participantsList = [{...unknownUserDetails, displayName: unknownUserDetails.login, accountID: unknownUserDetails.accountID ?? CONST.DEFAULT_NUMBER_ID}]; } else if (report?.ownerAccountID !== 0 || !option.text) { option.text = getPolicyName({report}); - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('workspace.common.workspace'); } option.isDisabled = true; @@ -1312,7 +1293,6 @@ function getPolicyExpenseReportOption( // Update text & alternateText because createOption returns workspace name only if report is owned by the user option.text = getPolicyName({report: expenseReport}); - // eslint-disable-next-line @typescript-eslint/no-deprecated option.alternateText = translateLocal('workspace.common.workspace'); option.isSelected = participant.selected; option.selected = participant.selected; // Keep for backwards compatibility @@ -2374,7 +2354,6 @@ function prepareReportOptionsForDisplay( if (shouldSeparateWorkspaceChat && newReportOption.isPolicyExpenseChat && !newReportOption.private_isArchived) { newReportOption.text = getPolicyName({report}); - // eslint-disable-next-line @typescript-eslint/no-deprecated newReportOption.alternateText = translateLocal('workspace.common.workspace'); if (report?.policyID) { @@ -2383,7 +2362,6 @@ function prepareReportOptionsForDisplay( const subtitle = submitsToAccountDetails?.displayName ?? submitsToAccountDetails?.login; if (subtitle) { - // eslint-disable-next-line @typescript-eslint/no-deprecated newReportOption.alternateText = translateLocal('iou.submitsTo', subtitle ?? ''); } const canSubmitPerDiemExpense = canSubmitPerDiemExpenseFromWorkspace(policy); @@ -2925,7 +2903,6 @@ function getHeaderMessage(hasSelectableOptions: boolean, hasUserToInvite: boolea const isValidEmail = Str.isValidEmail(searchValue); if (searchValue && CONST.REGEX.DIGITS_AND_PLUS.test(searchValue) && !isValidPhone && !hasSelectableOptions) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('messages.errorMessageInvalidPhone'); } @@ -2933,17 +2910,14 @@ function getHeaderMessage(hasSelectableOptions: boolean, hasUserToInvite: boolea // Therefore, this skips the validation when there is no search value. if (searchValue && !hasSelectableOptions && !hasUserToInvite) { if (/^\d+$/.test(searchValue) && !isValidPhone) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('messages.errorMessageInvalidPhone'); } if (/@/.test(searchValue) && !isValidEmail) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('messages.errorMessageInvalidEmail'); } if (hasMatchedParticipant && (isValidEmail || isValidPhone)) { return ''; } - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('common.noResultsFound'); } @@ -2955,7 +2929,6 @@ function getHeaderMessage(hasSelectableOptions: boolean, hasUserToInvite: boolea */ function getHeaderMessageForNonUserList(hasSelectableOptions: boolean, searchValue: string): string { if (searchValue && !hasSelectableOptions) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('common.noResultsFound'); } return ''; diff --git a/src/libs/OptionsListUtils/searchMatchUtils.ts b/src/libs/OptionsListUtils/searchMatchUtils.ts index a96af2bb15ff..64de125f61b2 100644 --- a/src/libs/OptionsListUtils/searchMatchUtils.ts +++ b/src/libs/OptionsListUtils/searchMatchUtils.ts @@ -21,7 +21,6 @@ type SearchMatchConfig = { * login with dots stripped before @, and translated "You"/"Me". */ function getCurrentUserSearchTerms(item: Partial) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return [item.text ?? item.displayName ?? '', item.login ?? '', item.login?.replace(CONST.EMAIL_SEARCH_REGEX, '') ?? '', translateLocal('common.you'), translateLocal('common.me')]; } diff --git a/src/libs/PersonalDetailsUtils.ts b/src/libs/PersonalDetailsUtils.ts index 341af755e35e..81ed9e4a5909 100644 --- a/src/libs/PersonalDetailsUtils.ts +++ b/src/libs/PersonalDetailsUtils.ts @@ -45,9 +45,7 @@ Onyx.connect({ if (value ?? true) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated hiddenTranslation = translateLocal('common.hidden'); - // eslint-disable-next-line @typescript-eslint/no-deprecated youTranslation = translateLocal('common.you').toLowerCase(); }, }); @@ -128,7 +126,6 @@ function getPersonalDetailsByIDs({ if (shouldChangeUserDisplayName && currentUserAccountID === detail.accountID) { return { ...detail, - // eslint-disable-next-line @typescript-eslint/no-deprecated displayName: translateLocal('common.you'), }; } diff --git a/src/libs/Pusher/index.native.ts b/src/libs/Pusher/index.native.ts index 9d4a2d65c65e..b7f6180e1743 100644 --- a/src/libs/Pusher/index.native.ts +++ b/src/libs/Pusher/index.native.ts @@ -227,7 +227,6 @@ function subscribe( const promise = initPromise.then( () => new Promise((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (disposed) { resolve(); diff --git a/src/libs/Pusher/index.ts b/src/libs/Pusher/index.ts index 7b1290b8f0a3..b98670e8be33 100644 --- a/src/libs/Pusher/index.ts +++ b/src/libs/Pusher/index.ts @@ -226,7 +226,6 @@ function subscribe( const promise = initPromise.then( () => new Promise((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (disposed) { resolve(); diff --git a/src/libs/ReportActionItemEventHandler/index.android.ts b/src/libs/ReportActionItemEventHandler/index.android.ts index 85c2ebabc8ae..bd90f5d2a376 100644 --- a/src/libs/ReportActionItemEventHandler/index.android.ts +++ b/src/libs/ReportActionItemEventHandler/index.android.ts @@ -4,7 +4,6 @@ import type ReportActionItemEventHandler from './types'; const reportActionItemEventHandler: ReportActionItemEventHandler = { handleComposerLayoutChange: (reportScrollManager, index) => () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { reportScrollManager.scrollToIndex(index, true); diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index feb90e8ec082..79f0063c2487 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -421,10 +421,8 @@ function isCardBrokenConnectionAction(reportAction: OnyxInputOrEntry(reportAction: OnyxInputOrEntry>): OriginalMessage | undefined { if (!Array.isArray(reportAction?.message)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return reportAction?.message ?? reportAction?.originalMessage; } - // eslint-disable-next-line @typescript-eslint/no-deprecated return reportAction?.originalMessage; } @@ -1068,7 +1066,6 @@ function isReportActionDeprecated(reportAction: OnyxEntry, key: st // HACK ALERT: We're temporarily filtering out any reportActions keyed by sequenceNumber // to prevent bugs during the migration from sequenceNumber -> reportActionID - // eslint-disable-next-line @typescript-eslint/no-deprecated if (String(reportAction.sequenceNumber) === key) { Log.info('Front-end filtered out reportAction keyed by sequenceNumber!', false, reportAction); return true; @@ -1996,7 +1993,6 @@ function isReportActionAttachment(reportAction: OnyxInputOrEntry): function getMemberChangeMessageElements( translate: LocalizedTranslate, reportAction: OnyxEntry, - // eslint-disable-next-line @typescript-eslint/no-deprecated getReportNameCallback: typeof getReportName, ): readonly MemberChangeMessageElement[] { const isInviteAction = isInviteMemberAction(reportAction); @@ -2033,7 +2029,6 @@ function getMemberChangeMessageElements( }); const buildRoomElements = (): readonly MemberChangeMessageElement[] => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const roomName = getReportNameCallback({report: allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${originalMessage?.reportID}`]}) || originalMessage?.roomName; if (roomName && originalMessage) { const preposition = isInviteAction ? ` ${translate('workspace.invite.to')} ` : ` ${translate('workspace.invite.from')} `; @@ -2339,7 +2334,6 @@ function getDynamicExternalWorkflowApproveFailedActionMessage(translate: Localiz return failedApproveReason; } -// eslint-disable-next-line @typescript-eslint/no-deprecated function getMemberChangeMessageFragment(translate: LocalizedTranslate, reportAction: OnyxEntry, getReportNameCallback: typeof getReportName): Message { const messageElements: readonly MemberChangeMessageElement[] = getMemberChangeMessageElements(translate, reportAction, getReportNameCallback); const html = messageElements diff --git a/src/libs/ReportNameUtils.ts b/src/libs/ReportNameUtils.ts index c06e0c2ab505..b7d90f7f6ec9 100644 --- a/src/libs/ReportNameUtils.ts +++ b/src/libs/ReportNameUtils.ts @@ -188,7 +188,6 @@ Onyx.connect({ }); function generateArchivedReportName(reportName: string): string { - // eslint-disable-next-line @typescript-eslint/no-deprecated return `${reportName} (${translateLocal('common.archived')}) `; } @@ -284,7 +283,6 @@ function getGroupChatName( .slice(0, CONST.REPORT_NAME_LIMIT) .concat(shouldAddEllipsis ? '...' : ''); } - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('groupChat.defaultReportName', getDisplayNameForParticipant({accountID: participantAccountIDs.at(0), formatPhoneNumber})); } @@ -299,7 +297,6 @@ function getPolicyExpenseChatName({report, personalDetailsList}: {report: OnyxEn const reportOwnerDisplayName = getDisplayNameForParticipant({accountID: ownerAccountID, shouldRemoveDomain: true, formatPhoneNumber: formatPhoneNumberPhoneUtils}) || login; if (reportOwnerDisplayName) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('workspace.common.policyExpenseChatName', reportOwnerDisplayName); } @@ -390,27 +387,22 @@ function getMoneyRequestReportName({report, policy, invoiceReceiverPolicy}: {rep } else { payerOrApproverName = getDisplayNameForParticipant({accountID: report?.managerID, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? ''; } - // eslint-disable-next-line @typescript-eslint/no-deprecated const payerPaidAmountMessage = translateLocal('iou.payerPaidAmount', formattedAmount, payerOrApproverName); if (isReportApproved({report})) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.managerApprovedAmount', payerOrApproverName, formattedAmount); } if (report?.isWaitingOnBankAccount) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return `${payerPaidAmountMessage} ${CONST.DOT_SEPARATOR} ${translateLocal('iou.pending')}`; } if (!isSettled(report?.reportID) && hasNonReimbursableTransactions(report?.reportID)) { payerOrApproverName = getDisplayNameForParticipant({accountID: report?.ownerAccountID, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? ''; - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.payerSpentAmount', formattedAmount, payerOrApproverName); } if (isProcessingReport(report) || isOpenExpenseReport(report) || isOpenInvoiceReport(report) || moneyRequestTotal === 0) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.payerOwesAmount', formattedAmount, payerOrApproverName); } @@ -897,7 +889,6 @@ function computeReportName({ const parentReportAction = isThread(report) ? reportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.parentReportID}`]?.[report.parentReportActionID] : undefined; const parentReportActionBasedName = computeReportNameBasedOnReportAction( - // eslint-disable-next-line @typescript-eslint/no-deprecated translateLocal, formatPhoneNumberPhoneUtils, parentReportAction, @@ -931,7 +922,6 @@ function computeReportName({ currentUserLogin, conciergeReportID, }); - // eslint-disable-next-line @typescript-eslint/no-deprecated return getCreatedReportForUnapprovedTransactionsMessage(originalID, reportName, isOriginalReportDeleted(parentReportAction, originalReport), translateLocal); } @@ -945,7 +935,6 @@ function computeReportName({ const policyTags = allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${report.policyID}`]; const chatThreadReportName = computeChatThreadReportName( - // eslint-disable-next-line @typescript-eslint/no-deprecated -- translateLocal is deprecated; computeReportName is non-React code that cannot use the translate hook translateLocal, privateIsArchivedValue, report, @@ -961,7 +950,6 @@ function computeReportName({ const transactionsArray = transactions ? (Object.values(transactions).filter(Boolean) as Array>) : undefined; if (isClosedExpenseReportWithNoExpenses(report, transactionsArray)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('parentReportAction.deletedReport'); } diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 3ce3f625e236..653ba8e223e5 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1264,9 +1264,7 @@ Onyx.connect({ if (value ?? true) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated hiddenTranslation = translateLocal('common.hidden'); - // eslint-disable-next-line @typescript-eslint/no-deprecated unavailableTranslation = translateLocal('workspace.common.unavailable'); }, }); @@ -1728,7 +1726,6 @@ function isCurrentUserInvoiceReceiver(report: OnyxEntry): boolean { if (report?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.BUSINESS) { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(report.invoiceReceiver.policyID); return isPolicyAdminPolicyUtils(policy); } @@ -2036,7 +2033,6 @@ function isAwaitingFirstLevelApproval(report: OnyxEntry): boolean { } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const submitsToAccountID = getSubmitToAccountID(getPolicy(report.policyID), report); return isProcessingReport(report) && submitsToAccountID === report.managerID; @@ -2399,7 +2395,6 @@ function isJoinRequestInAdminRoom(report: OnyxEntry): boolean { // since they are not a part of the company, and should not action it on their behalf. if (report.policyID) { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(report.policyID); if (!isExpensifyTeam(policy?.owner) && isExpensifyTeam(currentUserPersonalDetails?.login)) { return false; @@ -2414,7 +2409,6 @@ function isJoinRequestInAdminRoom(report: OnyxEntry): boolean { function isAuditor(report: OnyxEntry): boolean { if (report?.policyID) { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(report.policyID); return isPolicyAuditor(policy); } @@ -2779,7 +2773,6 @@ function canAddTransaction(moneyRequestReport: OnyxEntry, isReportArchiv } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(moneyRequestReport?.policyID); if (isExpenseReport(moneyRequestReport) && (!isCurrentUserSubmitter(moneyRequestReport) || !isPaidGroupPolicyPolicyUtils(policy))) { @@ -2881,7 +2874,6 @@ function hasOutstandingChildRequest( ) { const reportActions = getAllReportActions(chatReport.reportID); // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(chatReport.policyID); return Object.values(reportActions).some((action) => { const iouReportID = getIOUReportIDFromReportActionPreview(action); @@ -2899,7 +2891,6 @@ function hasOutstandingChildRequest( const reportMetadata = allReportMetadata?.[`${ONYXKEYS.COLLECTION.REPORT_METADATA}${iouReportID}`]; const invoiceReceiverPolicyID = chatReport?.invoiceReceiver && 'policyID' in chatReport.invoiceReceiver ? chatReport.invoiceReceiver.policyID : undefined; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const invoiceReceiverPolicy = getPolicy(invoiceReceiverPolicyID); return ( canIOUBePaid(iouReport, chatReport, policy, bankAccountList, transactions, undefined, undefined, invoiceReceiverPolicy) || @@ -3548,7 +3539,6 @@ function getInvoiceReceiverIcons(report: OnyxInputOrEntry, personalDetai const receiverPolicyID = report?.invoiceReceiver?.policyID; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const receiverPolicy = invoiceReceiverPolicy ?? getPolicy(receiverPolicyID); if (!isEmptyObject(receiverPolicy)) { return [ @@ -3764,7 +3754,6 @@ function getIconsForInvoiceReport( const receiverPolicyID = invoiceRoomReport?.invoiceReceiver?.policyID; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const receiverPolicy = invoiceReceiverPolicy ?? getPolicy(receiverPolicyID); if (!isEmptyObject(receiverPolicy)) { @@ -3915,7 +3904,6 @@ function getDisplayNamesWithTooltips( let pronouns = user?.pronouns ?? undefined; if (pronouns?.startsWith(CONST.PRONOUNS.PREFIX)) { const pronounTranslationKey = pronouns.replace(CONST.PRONOUNS.PREFIX, ''); - // eslint-disable-next-line @typescript-eslint/no-deprecated pronouns = translateLocal(`pronouns.${pronounTranslationKey}` as TranslationPaths); } @@ -3955,11 +3943,9 @@ function getUserDetailTooltipText(accountID: number, formatPhoneNumber: LocaleCo */ function getDeletedParentActionMessageForChatReport(reportAction: OnyxEntry): string { // By default, let us display [Deleted message] - // eslint-disable-next-line @typescript-eslint/no-deprecated let deletedMessageText = translateLocal('parentReportAction.deletedMessage'); if (isCreatedTaskReportAction(reportAction)) { // For canceled task report, let us display [Deleted task] - // eslint-disable-next-line @typescript-eslint/no-deprecated deletedMessageText = translateLocal('parentReportAction.deletedTask'); } return deletedMessageText; @@ -4245,11 +4231,9 @@ function getReasonAndReportActionThatRequiresAttention( const optionReportMetadata = allReportMetadata?.[`${ONYXKEYS.COLLECTION.REPORT_METADATA}${optionOrReport.reportID}`]; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(optionOrReport.policyID); const invoiceReceiverPolicyID = optionOrReport?.invoiceReceiver && 'policyID' in optionOrReport.invoiceReceiver ? optionOrReport.invoiceReceiver.policyID : undefined; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const invoiceReceiverPolicy = invoiceReceiverPolicyID ? getPolicy(invoiceReceiverPolicyID) : undefined; const actionTypeForAssigneeToComplete = getActionTypeForAssigneeToComplete(optionOrReport, parentReportAction); @@ -4706,7 +4690,6 @@ function canEditMoneyRequest( return isSubmitted && isRequestor; } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportPolicy = policy ?? getPolicy(moneyRequestReport?.policyID); const isAdmin = reportPolicy?.role === CONST.POLICY.ROLE.ADMIN; const isManager = deprecatedCurrentUserAccountID === moneyRequestReport?.managerID; @@ -4735,7 +4718,6 @@ function canEditMoneyRequest( function getNextApproverAccountID(report: OnyxEntry, isUnapproved = false) { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(report?.policyID); // If the current user took control, then they are the final approver and we don't have a next approver @@ -4937,7 +4919,6 @@ function canEditFieldOfMoneyRequest({ } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportPolicy = policy ?? getPolicy(moneyRequestReport?.policyID); const isAdmin = isExpenseReport(moneyRequestReport) && reportPolicy?.role === CONST.POLICY.ROLE.ADMIN; const isManager = isExpenseReport(moneyRequestReport) && deprecatedCurrentUserAccountID === moneyRequestReport?.managerID; @@ -5380,18 +5361,15 @@ function getReportPreviewMessage( if (!isEmptyObject(linkedTransaction)) { if (isScanning(linkedTransaction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.receiptScanning', {count: 1}); } if (hasMissingSmartscanFieldsTransactionUtils(linkedTransaction, report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.receiptMissingDetails'); } const amount = getTransactionAmount(linkedTransaction, !isEmptyObject(report) && isExpenseReport(report), linkedTransaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID) ?? 0; const formattedAmount = convertToDisplayString(amount, getCurrency(linkedTransaction)) ?? ''; - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.didSplitAmount', formattedAmount, getMerchantOrDescription(linkedTransaction)); } } @@ -5407,7 +5385,6 @@ function getReportPreviewMessage( if (amount && currency) { const formattedAmount = convertToDisplayString(amount, currency); - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.trackedAmount', formattedAmount, comment); } @@ -5416,12 +5393,10 @@ function getReportPreviewMessage( if (!isEmptyObject(linkedTransaction)) { if (isScanning(linkedTransaction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.receiptScanning', {count: 1}); } if (hasMissingSmartscanFieldsTransactionUtils(linkedTransaction, report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.receiptMissingDetails'); } @@ -5430,7 +5405,6 @@ function getReportPreviewMessage( const merchantOrComment = getMerchantOrDescription(linkedTransaction); - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.trackedAmount', formattedAmount, merchantOrComment); } } @@ -5447,7 +5421,6 @@ function getReportPreviewMessage( const formattedAmount = convertToDisplayString(totalAmount, report.currency); if (isReportApproved({report}) && isPaidGroupPolicy(report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.managerApprovedAmount', payerName ?? '', formattedAmount); } @@ -5459,12 +5432,10 @@ function getReportPreviewMessage( } if (!isEmptyObject(linkedTransaction) && isScanning(linkedTransaction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.receiptScanning', {count: numberOfScanningReceipts}); } if (!isEmptyObject(linkedTransaction) && isFetchingWaypointsFromServer(linkedTransaction) && !getTransactionAmount(linkedTransaction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.fieldPending'); } @@ -5494,7 +5465,6 @@ function getReportPreviewMessage( if (isFromInvoice) { translatePhraseKey = originalMessage?.payAsBusiness ? 'iou.settleInvoiceBusiness' : 'iou.settleInvoicePersonal'; const currentBankAccount = getBankAccountFromID(originalMessage?.bankAccountID); - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal(translatePhraseKey, formattedAmount, currentBankAccount?.accountData?.accountNumber?.slice(-4) ?? ''); } } @@ -5508,26 +5478,21 @@ function getReportPreviewMessage( actualPayerName = actualPayerName && isForListPreview && !isPreviewMessageForParentChatReport ? `${actualPayerName}:` : actualPayerName; const payerDisplayName = isPreviewMessageForParentChatReport ? payerName : actualPayerName; if (translatePhraseKey === 'iou.businessBankAccount') { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal(translatePhraseKey, '', reportPolicy?.achAccount?.accountNumber?.slice(-4) ?? ''); } if (translatePhraseKey === 'iou.automaticallyPaidWithExpensify' || translatePhraseKey === 'iou.paidWithExpensify') { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal(translatePhraseKey, payerDisplayName ?? ''); } if (translatePhraseKey === 'iou.paidElsewhere') { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal(translatePhraseKey, {payer: payerDisplayName ?? undefined}); } if (translatePhraseKey === 'iou.payerPaidAmount') { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal(translatePhraseKey, formattedAmount, payerDisplayName ?? ''); } } if (report.isWaitingOnBankAccount) { const submitterDisplayName = getDisplayNameForParticipant({accountID: report.ownerAccountID, shouldUseShortForm: true, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? ''; - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.waitingOnBankAccount', submitterDisplayName); } @@ -5558,19 +5523,16 @@ function getReportPreviewMessage( lastActorID && lastActorID !== deprecatedCurrentUserAccountID ? getDisplayNameForParticipant({accountID: lastActorID, shouldUseShortForm: !isPreviewMessageForParentChatReport, formatPhoneNumber: formatPhoneNumberPhoneUtils}) : ''; - // eslint-disable-next-line @typescript-eslint/no-deprecated return `${requestorName ? `${requestorName}: ` : ''}${translateLocal('iou.expenseAmount', amountToDisplay, comment)}`; } if (containsNonReimbursable) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal( 'iou.payerSpentAmount', formattedAmount, getDisplayNameForParticipant({accountID: report.ownerAccountID, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? '', ); } - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('iou.payerOwesAmount', formattedAmount, payerName ?? '', comment); } @@ -5753,7 +5715,6 @@ function parseReportActionHtmlToText(reportAction: OnyxEntry, repo for (const match of matches) { if (match[1] !== childReportID) { // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated reportIDToName[match[1]] = getReportName({report: getReportOrDraftReport(match[1]), conciergeReportID}) ?? ''; } } @@ -5805,7 +5766,6 @@ function getReportName(reportNameInformation: GetReportNameParams): string { const reportPolicy = policy ?? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]; const parentReportActionBasedName = computeReportNameBasedOnReportAction( - // eslint-disable-next-line @typescript-eslint/no-deprecated translateLocal, formatPhoneNumberPhoneUtils, parentReportAction, @@ -5823,9 +5783,7 @@ function getReportName(reportNameInformation: GetReportNameParams): string { if (isActionOfType(parentReportAction, CONST.REPORT.ACTIONS.TYPE.CREATED_REPORT_FOR_UNAPPROVED_TRANSACTIONS)) { const {originalID} = getOriginalMessage(parentReportAction) ?? {}; const originalReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${originalID}`]; - // eslint-disable-next-line @typescript-eslint/no-deprecated -- temporarily disabling rule for deprecated functions out of issue scope const reportName = getReportName({report: originalReport}); - // eslint-disable-next-line @typescript-eslint/no-deprecated -- temporarily disabling rule for deprecated functions out of issue scope return getCreatedReportForUnapprovedTransactionsMessage(originalID, reportName, !!parentReportAction.isOriginalReportDeleted, translateLocal); } @@ -5836,7 +5794,6 @@ function getReportName(reportNameInformation: GetReportNameParams): string { if (isChatThread(report)) { if (!isEmptyObject(parentReportAction) && isTransactionThread(parentReportAction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated -- temporarily disabling rule for deprecated functions out of issue scope formattedName = getTransactionReportName({translate: translateLocal, reportAction: parentReportAction, transactions, reports}); if (isArchivedNonExpense) { @@ -5846,14 +5803,12 @@ function getReportName(reportNameInformation: GetReportNameParams): string { } if (parentReportActionMessage?.isDeletedParentAction) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('parentReportAction.deletedMessage'); } const isAttachment = isReportActionAttachment(!isEmptyObject(parentReportAction) ? parentReportAction : undefined); const reportActionMessage = parseReportActionHtmlToText(parentReportAction, report?.parentReportID, conciergeReportID, report?.reportID).replaceAll(/(\n+|\r\n|\n|\r)/gm, ' '); if (isAttachment && reportActionMessage) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return `[${translateLocal('common.attachment')}]`; } if ( @@ -5861,11 +5816,9 @@ function getReportName(reportNameInformation: GetReportNameParams): string { parentReportActionMessage?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_HIDDEN || parentReportActionMessage?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_PENDING_REMOVE ) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('parentReportAction.hiddenMessage'); } if (isAdminRoom(report) || isUserCreatedPolicyRoom(report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return getAdminRoomInvitedParticipants(translateLocal, parentReportAction, reportActionMessage); } @@ -5876,7 +5829,6 @@ function getReportName(reportNameInformation: GetReportNameParams): string { const movedFromReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${getMovedReportID(parentReportAction, CONST.REPORT.MOVE_TYPE.FROM)}`]; const movedToReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${getMovedReportID(parentReportAction, CONST.REPORT.MOVE_TYPE.TO)}`]; const modifiedMessageWithHTML = getForReportAction({ - // eslint-disable-next-line @typescript-eslint/no-deprecated -- translateLocal is deprecated; getReportName is non-React code that cannot use the translate hook translate: translateLocal, reportAction: parentReportAction, policy, @@ -5896,7 +5848,6 @@ function getReportName(reportNameInformation: GetReportNameParams): string { } if (isClosedExpenseReportWithNoExpenses(report, transactions)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('parentReportAction.deletedReport'); } @@ -5925,7 +5876,6 @@ function getReportName(reportNameInformation: GetReportNameParams): string { formattedName = getInvoicesChatName({ report, // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated receiverPolicy: invoiceReceiverPolicy ?? getPolicy(invoiceReceiverPolicyID), personalDetails, policy, @@ -5981,7 +5931,6 @@ function getSearchReportName(props: GetReportNameParams): string { visitedReportIDs.add(currentParent.reportID); if (isExpenseReport(currentParent)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return getReportName({ report: currentParent, policy, @@ -6001,7 +5950,6 @@ function getSearchReportName(props: GetReportNameParams): string { return policy.name; } // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated return getReportName({ report, policy, @@ -6067,15 +6015,12 @@ function getChatRoomSubtitle(report: OnyxEntry, isPolicyNamePreferred = return ''; } if (isSelfDM(report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('reportActionsView.yourSpace'); } if (isInvoiceRoom(report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('workspace.common.invoices'); } if (isConciergeChatReport(report)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('reportActionsView.conciergeSupport'); } if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { @@ -6094,7 +6039,6 @@ function getChatRoomSubtitle(report: OnyxEntry, isPolicyNamePreferred = if (!subtitle || !isPolicyNamePreferred) { return getPolicyName({report}); } - // eslint-disable-next-line @typescript-eslint/no-deprecated return `${getReportSubtitlePrefix(report)}${translateLocal('iou.submitsTo', subtitle ?? '')}`; } @@ -6133,7 +6077,6 @@ function getParentNavigationSubtitle( if (isExpenseReport(report)) { return { - // eslint-disable-next-line @typescript-eslint/no-deprecated reportName: translateLocal('workspace.common.policyExpenseChatName', reportOwnerDisplayName ?? ''), workspaceName: getPolicyName({report, policy}), }; @@ -6157,7 +6100,6 @@ function getParentNavigationSubtitle( } if (isArchivedNonExpenseReport(parentReport, isParentReportArchived)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated reportName += ` (${translateLocal('common.archived')})`; } @@ -6168,7 +6110,6 @@ function getParentNavigationSubtitle( return { // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated reportName: getReportName({report: parentReport, reportAttributes, conciergeReportID}), workspaceName: getPolicyName({report: parentReport, policy, returnEmptyIfNotFound: true}), }; @@ -6301,7 +6242,6 @@ function getParsedComment(text: string, parsingDetails?: ParsingDetails, mediaAt if (parsingDetails?.policyID) { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policyType = getPolicy(parsingDetails?.policyID)?.type; if (policyType) { isGroupPolicyReport = isGroupPolicy(policyType); @@ -6616,7 +6556,6 @@ function buildOptimisticIOUReport( const payerEmail = 'login' in personalDetails ? personalDetails.login : ''; const policyID = chatReportID ? getReport(chatReportID, deprecatedAllReports)?.policyID : undefined; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(policyID); const created = createdTimestamp ?? DateUtils.getDBTime(); @@ -6829,7 +6768,6 @@ function buildOptimisticExpenseReport({ const policyName = getPolicyName({report}); const formattedTotal = convertToDisplayString(storedTotal, currency); // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policyReal = getPolicy(policyID); const policyDraft = allPolicyDrafts?.[`${ONYXKEYS.COLLECTION.POLICY_DRAFTS}${policyID}`]; const policy = policyReal ?? policyDraft; @@ -6955,7 +6893,6 @@ function getMovedTransactionMessage(translate: LocalizedTranslate, action: Repor const report = fromReport ?? toReport; // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = Parser.htmlToText(getReportName({report, conciergeReportID}) ?? report?.reportName ?? ''); const reportUrl = getReportURLForCurrentContext(report?.reportID); if (typeof fromReportID === 'undefined') { @@ -6976,7 +6913,6 @@ function getUnreportedTransactionMessage( const fromReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${fromReportID}`]; // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = Parser.htmlToText(getReportName({report: fromReport, conciergeReportID}) ?? fromReport?.reportName ?? ''); let reportUrl = getReportURLForCurrentContext(fromReportID); @@ -7405,10 +7341,8 @@ function buildOptimisticChangePolicyReportAction(fromPolicyID: string | undefine }; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const fromPolicy = getPolicy(fromPolicyID); // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const toPolicy = getPolicy(toPolicyID); const changePolicyReportActionMessage = [ @@ -8489,7 +8423,6 @@ function buildOptimisticChangeApproverReportAction(managerID: number, actorAccou function buildOptimisticAnnounceChat(policyID: string, accountIDs: number[], currentUserAccountID: number | undefined): OptimisticAnnounceChat { const announceReport = getRoom(CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE, policyID); // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(policyID); const announceRoomOnyxData: AnnounceRoomOnyxData = { onyxOptimisticData: [], @@ -9517,7 +9450,6 @@ function hasReportErrorsOtherThanFailedReceipt( return ( doesTransactionThreadReportHasViolations || doesReportHaveViolations || - // eslint-disable-next-line @typescript-eslint/no-deprecated Object.values(allReportErrors).some((error) => error?.[0] !== translateLocal('iou.error.genericSmartscanFailureMessage')) || !!getReceiptUploadErrorReason(report, chatReport, transactionReportActions, transactions) ); @@ -10049,7 +9981,6 @@ function getMoneyRequestOptions( // We don't allow IOU actions if an Expensify account is a participant of the report, unless the policy that the report is on is owned by an Expensify account const doParticipantsIncludeExpensifyAccounts = lodashIntersection(reportParticipants, CONST.EXPENSIFY_ACCOUNT_IDS).length > 0; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policyOwnerAccountID = getPolicy(report?.policyID)?.ownerAccountID; const isPolicyOwnedByExpensifyAccounts = policyOwnerAccountID ? CONST.EXPENSIFY_ACCOUNT_IDS.includes(policyOwnerAccountID) : false; if (doParticipantsIncludeExpensifyAccounts && !isPolicyOwnedByExpensifyAccounts) { @@ -10164,7 +10095,6 @@ function canLeaveInvoiceRoom(report: OnyxEntry): boolean { return false; } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const isSenderPolicyAdmin = getPolicy(report.policyID)?.role === CONST.POLICY.ROLE.ADMIN; if (isSenderPolicyAdmin) { @@ -10176,7 +10106,6 @@ function canLeaveInvoiceRoom(report: OnyxEntry): boolean { } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const isReceiverPolicyAdmin = getPolicy(report.invoiceReceiver.policyID)?.role === CONST.POLICY.ROLE.ADMIN; if (isReceiverPolicyAdmin) { @@ -11109,7 +11038,6 @@ function isReportOwner(report: OnyxInputOrEntry): boolean { function isAllowedToApproveExpenseReport(report: OnyxEntry, approverAccountID?: number, reportPolicy?: OnyxEntry): boolean { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = reportPolicy ?? getPolicy(report?.policyID); const isOwner = (approverAccountID ?? deprecatedCurrentUserAccountID) === report?.ownerAccountID; return !(policy?.preventSelfApproval && isOwner); @@ -11605,7 +11533,6 @@ function getOutstandingChildRequest(iouReport: OnyxInputOrEntry): Outsta } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const policy = getPolicy(iouReport.policyID); const shouldBeManuallySubmitted = isPaidGroupPolicyPolicyUtils(policy) && !policy?.harvesting?.enabled && isOpenReport(iouReport); if (shouldBeManuallySubmitted) { @@ -11734,7 +11661,6 @@ function prepareOnboardingOnyxData({ const integrationName = userReportedIntegration ? CONST.ONBOARDING_ACCOUNTING_MAPPING[userReportedIntegration as keyof typeof CONST.ONBOARDING_ACCOUNTING_MAPPING] : ''; // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated const assignedGuideEmail = getPolicy(targetChatPolicyID)?.assignedGuide?.email ?? CONST.SETUP_SPECIALIST_LOGIN; const assignedGuidePersonalDetail = getPersonalDetailByEmail(assignedGuideEmail); let assignedGuideAccountID: number; @@ -11920,7 +11846,6 @@ function prepareOnboardingOnyxData({ // Sign-off welcome message const welcomeSignOffText = - // eslint-disable-next-line @typescript-eslint/no-deprecated engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM ? translateLocal('onboarding.welcomeSignOffTitleManageTeam') : translateLocal('onboarding.welcomeSignOffTitle'); // delegateAccountIDParam: will be threaded in PR 14; buildOptimisticAddCommentReportAction falls back to module-level Onyx.connect value (https://github.com/Expensify/App/issues/66425) const welcomeSignOffComment = buildOptimisticAddCommentReportAction({text: welcomeSignOffText, actorAccountID, createdOffset: tasksData.length + 3, delegateAccountIDParam: undefined}); @@ -12289,7 +12214,6 @@ function prepareOnboardingOnyxData({ key: `${ONYXKEYS.COLLECTION.POLICY}${onboardingPolicyID}`, value: { // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated areConnectionsEnabled: getPolicy(onboardingPolicyID)?.areConnectionsEnabled, pendingFields: { areConnectionsEnabled: null, @@ -12489,7 +12413,6 @@ function getFieldViolationTranslation(reportField: PolicyReportField, violation? switch (violation) { case 'fieldRequired': - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('reportViolations.fieldRequired', reportField.name); default: return ''; @@ -12783,7 +12706,6 @@ function hasMissingInvoiceBankAccount(iouReportID: string | undefined): boolean } // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - // eslint-disable-next-line @typescript-eslint/no-deprecated return invoiceReport?.ownerAccountID === deprecatedCurrentUserAccountID && !getPolicy(invoiceReport?.policyID)?.invoice?.bankAccount?.transferBankAccountID && isSettled(iouReportID); } @@ -12830,12 +12752,10 @@ function getChatListItemReportName(action: ReportAction & {reportName?: string}, if (report?.reportID) { // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated return getReportName({report: getReport(report?.reportID, deprecatedAllReports), conciergeReportID}); } // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated return getReportName({report, conciergeReportID}); } @@ -13505,7 +13425,6 @@ export { getReportFieldMaps, getReportIDFromLink, // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated getSearchReportName, getReportTransactions, getReportNotificationPreference, @@ -13743,7 +13662,6 @@ export { getReceiptUploadErrorReason, getAncestors, // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, doesReportContainRequestsFromMultipleUsers, shouldBlockSubmitDueToStrictPolicyRules, diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index e40ecf3fa81a..f0d63c60cce6 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -2446,7 +2446,6 @@ function getTaskSections( if (parentReport && personalDetails) { const policy = data[`${ONYXKEYS.COLLECTION.POLICY}${parentReport.policyID}`]; const isParentReportArchived = archivedReportsIDList?.has(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${parentReport?.reportID}`); - // eslint-disable-next-line @typescript-eslint/no-deprecated const parentReportName = getReportName({report: parentReport, policy, isReportArchived: isParentReportArchived, conciergeReportID}); const icons = getIcons(parentReport, formatPhoneNumber, personalDetails, null, '', -1, policy, undefined, isParentReportArchived); const parentReportIcon = icons?.at(0); @@ -2587,7 +2586,6 @@ function getReportActionsSections(data: OnyxTypes.SearchResults['data'], visible ...reportAction, reportID, from, - // eslint-disable-next-line @typescript-eslint/no-deprecated reportName: getSearchReportName({report, policy, personalDetails: data.personalDetailsList, transactions, invoiceReceiverPolicy, reports, isReportArchived}), formattedFrom: from?.displayName ?? from?.login ?? '', date: reportAction.created, diff --git a/src/libs/TransactionUtils/index.ts b/src/libs/TransactionUtils/index.ts index 29845965dbfd..ff880f2e6e2e 100644 --- a/src/libs/TransactionUtils/index.ts +++ b/src/libs/TransactionUtils/index.ts @@ -723,7 +723,6 @@ function getUpdatedTransaction({ // The waypoints were changed, but there is no route – it is pending from the BE and we should mark the fields as pending updatedTransaction.amount = CONST.IOU.DEFAULT_AMOUNT; updatedTransaction.modifiedAmount = CONST.IOU.DEFAULT_AMOUNT; - // eslint-disable-next-line @typescript-eslint/no-deprecated updatedTransaction.modifiedMerchant = translateLocal('iou.fieldPending'); } else { const mileageRate = DistanceRequestUtils.getRate({transaction: updatedTransaction, policy}); @@ -738,7 +737,6 @@ function getUpdatedTransaction({ unit, rate, transaction.currency, - // eslint-disable-next-line @typescript-eslint/no-deprecated translateLocal, (digit) => toLocaleDigit(IntlStore.getCurrentLocale(), digit), getCurrencySymbol, @@ -795,7 +793,6 @@ function getUpdatedTransaction({ unit, rate, updatedCurrency, - // eslint-disable-next-line @typescript-eslint/no-deprecated translateLocal, (digit) => toLocaleDigit(IntlStore.getCurrentLocale(), digit), getCurrencySymbol, @@ -881,7 +878,6 @@ function getUpdatedTransaction({ unit, rate, updatedCurrency, - // eslint-disable-next-line @typescript-eslint/no-deprecated translateLocal, (digit) => toLocaleDigit(IntlStore.getCurrentLocale(), digit), getCurrencySymbol, @@ -2145,7 +2141,6 @@ function transformedTaxRates(policy: OnyxEntry | undefined, transaction? return policy && getDefaultTaxCode(policy, transaction); }; - // eslint-disable-next-line @typescript-eslint/no-deprecated const getModifiedName = (data: TaxRate, code: string) => `${data.name} (${data.value})${defaultTaxCode() === code ? ` ${CONST.DOT_SEPARATOR} ${translateLocal('common.default')}` : ''}`; const taxes = Object.fromEntries(Object.entries(taxRates?.taxes ?? {}).map(([code, data]) => [code, {...data, code, modifiedName: getModifiedName(data, code), name: data.name}])); return taxes; diff --git a/src/libs/actions/IOU/DeleteMoneyRequest.ts b/src/libs/actions/IOU/DeleteMoneyRequest.ts index f6c95636f6a1..8e6bd2ab6ee3 100644 --- a/src/libs/actions/IOU/DeleteMoneyRequest.ts +++ b/src/libs/actions/IOU/DeleteMoneyRequest.ts @@ -203,7 +203,6 @@ function prepareToCleanUpMoneyRequest( } const hasNonReimbursableTransactions = hasNonReimbursableTransactionsReportUtils(iouReport?.reportID); - // eslint-disable-next-line @typescript-eslint/no-deprecated const messageText = Localize.translateLocal( hasNonReimbursableTransactions ? 'iou.payerSpentAmount' : 'iou.payerOwesAmount', convertToDisplayString(updatedIOUReport?.total, updatedIOUReport?.currency), @@ -458,7 +457,6 @@ function cleanUpMoneyRequest( // First, update the reportActions to ensure related actions are not displayed. Onyx.update(reportActionsOnyxUpdates).then(() => { Navigation.goBack(urlToNavigateBack); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (shouldDeleteIOUReport) { clearAllRelatedReportActionErrors(reportID, reportAction, originalReportID); diff --git a/src/libs/actions/IOU/Hold.ts b/src/libs/actions/IOU/Hold.ts index efd9c930e0b1..1f7e91216956 100644 --- a/src/libs/actions/IOU/Hold.ts +++ b/src/libs/actions/IOU/Hold.ts @@ -267,7 +267,6 @@ function putOnHold( if (iouReport) { // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: iouReport, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, @@ -491,7 +490,6 @@ function unholdRequest(transactionID: string, reportID: string, policy: OnyxEntr if (iouReport) { // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: iouReport, policy, diff --git a/src/libs/actions/IOU/PayMoneyRequest.ts b/src/libs/actions/IOU/PayMoneyRequest.ts index 9dfca7e16e94..5fab0acc3851 100644 --- a/src/libs/actions/IOU/PayMoneyRequest.ts +++ b/src/libs/actions/IOU/PayMoneyRequest.ts @@ -235,7 +235,6 @@ function getPayMoneyRequestParams({ if (!isInvoiceReport) { currentNextStepDeprecated = iouReportCurrentNextStepDeprecated ?? null; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated optimisticNextStepDeprecated = buildNextStepNew({report: iouReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.REIMBURSED}); optimisticNextStep = buildOptimisticNextStep({report: iouReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.REIMBURSED}); } @@ -494,7 +493,6 @@ function cancelPayment( const statusNum: ValueOf = approvalMode === CONST.POLICY.APPROVAL_MODE.OPTIONAL ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.APPROVED; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: expenseReport, predictedNextStatus: statusNum, @@ -657,7 +655,6 @@ function cancelPayment( onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport.reportID}`, // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated value: buildNextStepNew({ report: expenseReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.REIMBURSED, diff --git a/src/libs/actions/IOU/PerDiem.ts b/src/libs/actions/IOU/PerDiem.ts index f6e90665f0fd..4377c4bb1e1a 100644 --- a/src/libs/actions/IOU/PerDiem.ts +++ b/src/libs/actions/IOU/PerDiem.ts @@ -484,7 +484,6 @@ function getPerDiemExpenseInformation(perDiemExpenseInformation: PerDiemExpenseI const predictedNextStatus = iouReport.statusNum ?? (policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.OPEN); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: iouReport, predictedNextStatus, @@ -1008,7 +1007,6 @@ function submitPerDiemExpense(submitPerDiemExpenseInformation: PerDiemExpenseInf onDeferred: () => addOptimization(CONST.TELEMETRY.SUBMIT_OPTIMIZATION.DEFERRED_WRITE), }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); highlightTransactionOnSearchRouteIfNeeded(isFromGlobalCreate, transaction.transactionID, CONST.SEARCH.DATA_TYPES.EXPENSE); @@ -1092,7 +1090,6 @@ function submitPerDiemExpenseForSelfDM(submitPerDiemExpenseInformation: PerDiemE onDeferred: () => addOptimization(CONST.TELEMETRY.SUBMIT_OPTIMIZATION.DEFERRED_WRITE), }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); if (shouldHandleNavigation) { diff --git a/src/libs/actions/IOU/Receipt.ts b/src/libs/actions/IOU/Receipt.ts index 5fd7a1751c65..3eea7177141f 100644 --- a/src/libs/actions/IOU/Receipt.ts +++ b/src/libs/actions/IOU/Receipt.ts @@ -234,7 +234,6 @@ function replaceReceipt({transactionID, file, source, state, transactionPolicy, if (transactionPolicy && isPaidGroupPolicy(transactionPolicy) && newTransaction) { // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) and getPolicyRecentlyUsedTagsData (https://github.com/Expensify/App/issues/71491) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated const policyTagList = getPolicyTagsData(transactionPolicy.id); const currentTransactionViolations = allTransactionViolations[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`] ?? []; const violationsOnyxData = ViolationsUtils.getViolationsOnyxData( diff --git a/src/libs/actions/IOU/RejectMoneyRequest.ts b/src/libs/actions/IOU/RejectMoneyRequest.ts index f46a421393a8..0d0eaceae2b0 100644 --- a/src/libs/actions/IOU/RejectMoneyRequest.ts +++ b/src/libs/actions/IOU/RejectMoneyRequest.ts @@ -1041,14 +1041,12 @@ function rejectExpenseReport( key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${reportID}`, value: isRejectToSubmitter ? // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated buildNextStepNew({ report, predictedNextStatus: CONST.REPORT.STATUS_NUM.OPEN, isRejectedReport: true, }) : // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated buildNextStepNew({ report, predictedNextStatus: CONST.REPORT.STATUS_NUM.SUBMITTED, diff --git a/src/libs/actions/IOU/ReportWorkflow.ts b/src/libs/actions/IOU/ReportWorkflow.ts index 4b9aabdf5942..591a104507a6 100644 --- a/src/libs/actions/IOU/ReportWorkflow.ts +++ b/src/libs/actions/IOU/ReportWorkflow.ts @@ -382,8 +382,7 @@ function approveMoneyRequest(params: ApproveMoneyRequestFunctionParams) { // buildOptimisticNextStep is used in parallel const optimisticNextStepDeprecated = isDEWPolicy ? null - : // eslint-disable-next-line @typescript-eslint/no-deprecated - buildNextStepNew({ + : buildNextStepNew({ report: expenseReport, policy, currentUserAccountIDParam, @@ -733,7 +732,6 @@ function reopenReport( const predictedNextStatus = CONST.REPORT.STATUS_NUM.OPEN; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: expenseReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.OPEN, @@ -917,7 +915,6 @@ function retractReport( const predictedNextStatus = CONST.REPORT.STATUS_NUM.OPEN; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: expenseReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.OPEN, @@ -1089,7 +1086,6 @@ function unapproveExpenseReport( const optimisticUnapprovedReportAction = buildOptimisticUnapprovedReportAction(expenseReport.total ?? 0, expenseReport.currency ?? '', expenseReport.reportID, delegateEmail); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: expenseReport, predictedNextStatus: CONST.REPORT.STATUS_NUM.SUBMITTED, @@ -1277,8 +1273,7 @@ function submitReport({ // buildOptimisticNextStep is used in parallel const optimisticNextStepDeprecated = isDEWPolicy ? null - : // eslint-disable-next-line @typescript-eslint/no-deprecated - buildNextStepNew({ + : buildNextStepNew({ report: expenseReport, predictedNextStatus: isSubmitAndClosePolicy ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.SUBMITTED, policy, @@ -1527,7 +1522,6 @@ function assignReportToMe( const takeControlReportAction = buildOptimisticChangeApproverReportAction(accountID, accountID); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: {...report, managerID: accountID}, predictedNextStatus: report.statusNum ?? CONST.REPORT.STATUS_NUM.SUBMITTED, @@ -1643,7 +1637,6 @@ function addReportApprover( const takeControlReportAction = buildOptimisticChangeApproverReportAction(newApproverAccountID, accountID); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: {...report, managerID: newApproverAccountID}, predictedNextStatus: report.statusNum ?? CONST.REPORT.STATUS_NUM.SUBMITTED, diff --git a/src/libs/actions/IOU/SendInvoice.ts b/src/libs/actions/IOU/SendInvoice.ts index 75464d7f26d5..8faa20245499 100644 --- a/src/libs/actions/IOU/SendInvoice.ts +++ b/src/libs/actions/IOU/SendInvoice.ts @@ -805,7 +805,6 @@ function sendInvoice({ onDeferred: () => addOptimization(CONST.TELEMETRY.SUBMIT_OPTIMIZATION.DEFERRED_WRITE), }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); highlightTransactionOnSearchRouteIfNeeded(isFromGlobalCreate, transactionID, CONST.SEARCH.DATA_TYPES.INVOICE); diff --git a/src/libs/actions/IOU/Split.ts b/src/libs/actions/IOU/Split.ts index 810babc71ead..d5470746bc1c 100644 --- a/src/libs/actions/IOU/Split.ts +++ b/src/libs/actions/IOU/Split.ts @@ -281,7 +281,6 @@ function splitBill({ playSound(SOUNDS.DONE); API.write(WRITE_COMMANDS.SPLIT_BILL, parameters, onyxData); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); dismissModalAndOpenReportInInboxTab(existingSplitChatReportID); @@ -376,7 +375,6 @@ function splitBillAndOpenReport({ playSound(SOUNDS.DONE); API.write(WRITE_COMMANDS.SPLIT_BILL_AND_OPEN_REPORT, parameters, onyxData); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); dismissModalAndOpenReportInInboxTab(splitData.chatReportID); @@ -1071,7 +1069,6 @@ function completeSplitBill( playSound(SOUNDS.DONE); API.write(WRITE_COMMANDS.COMPLETE_SPLIT_BILL, parameters, {optimisticData, successData, failureData}); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); dismissModalAndOpenReportInInboxTab(chatReportID); notifyNewAction(chatReportID, undefined, true); @@ -1314,7 +1311,6 @@ function createSplitsAndOnyxData({ reportID: CONST.REPORT.SPLIT_REPORT_ID, comment, created, - // eslint-disable-next-line @typescript-eslint/no-deprecated merchant: merchant || Localize.translateLocal('iou.expense'), receipt, category, @@ -1622,7 +1618,6 @@ function createSplitsAndOnyxData({ reportID: oneOnOneIOUReport.reportID, comment, created, - // eslint-disable-next-line @typescript-eslint/no-deprecated merchant: merchant || Localize.translateLocal('iou.expense'), category, tag, @@ -1691,7 +1686,6 @@ function createSplitsAndOnyxData({ const optimisticPolicyRecentlyUsedTags = isPolicyExpenseChat ? buildOptimisticPolicyRecentlyUsedTags({ // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) and getPolicyRecentlyUsedTagsData (https://github.com/Expensify/App/issues/71491) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated policyTags: getPolicyTagsData(participant.policyID), policyRecentlyUsedTags, transactionTags: tag, @@ -1960,7 +1954,6 @@ function createDistanceRequest(distanceRequestInformation: CreateDistanceRequest policyParams: { policy, policyCategories, - // eslint-disable-next-line @typescript-eslint/no-deprecated policyTagList: getMoneyRequestPolicyTags({existingIOUReport, moneyRequestReportID, parentChatReport: currentChatReport, participant}), policyRecentlyUsedCategories, policyRecentlyUsedTags, @@ -2085,7 +2078,6 @@ function createDistanceRequest(distanceRequestInformation: CreateDistanceRequest onDeferred: () => addOptimization(CONST.TELEMETRY.SUBMIT_OPTIMIZATION.DEFERRED_WRITE), }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID)); const activeReportID = isMoneyRequestReport && report?.reportID ? report.reportID : parameters.chatReportID; diff --git a/src/libs/actions/IOU/SplitTransactionUpdate.ts b/src/libs/actions/IOU/SplitTransactionUpdate.ts index 892df2ab762e..48061a06f6f1 100644 --- a/src/libs/actions/IOU/SplitTransactionUpdate.ts +++ b/src/libs/actions/IOU/SplitTransactionUpdate.ts @@ -443,7 +443,6 @@ function updateSplitTransactions({ parentChatReport, policyParams: { ...policyParams, - // eslint-disable-next-line @typescript-eslint/no-deprecated policyTagList: getMoneyRequestPolicyTags({moneyRequestReportID: splitExpense?.reportID, parentChatReport, participant: participantParams.participant}), }, transactionParams, @@ -521,7 +520,6 @@ function updateSplitTransactions({ policy, policyTagList: policyTags ?? null, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(transactionIOUReport?.policyID), policyCategories: policyCategories ?? null, newTransactionReportID: splitExpense?.reportID, @@ -1286,7 +1284,6 @@ function updateSplitTransactions({ apiWrite(WRITE_COMMANDS.UPDATE_SPLIT_TRANSACTION, splitParameters, onyxData); } } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => removeDraftSplitTransaction(originalTransactionID)); } diff --git a/src/libs/actions/IOU/TrackExpense.ts b/src/libs/actions/IOU/TrackExpense.ts index 62aa4dcd5e32..b5df561e0b60 100644 --- a/src/libs/actions/IOU/TrackExpense.ts +++ b/src/libs/actions/IOU/TrackExpense.ts @@ -1658,7 +1658,6 @@ function requestMoney(requestMoneyInformation: RequestMoneyInformation): {iouRep participantParams, policyParams: { ...policyParams, - // eslint-disable-next-line @typescript-eslint/no-deprecated policyTagList: getMoneyRequestPolicyTags({ existingIOUReport, moneyRequestReportID, @@ -2026,7 +2025,6 @@ function convertBulkTrackedExpensesToIOU({ personalDetails, betas, policyParams: { - // eslint-disable-next-line @typescript-eslint/no-deprecated policyTagList: getMoneyRequestPolicyTags({ moneyRequestReportID: iouReportID, parentChatReport: chatReport, diff --git a/src/libs/actions/IOU/UpdateMoneyRequest.ts b/src/libs/actions/IOU/UpdateMoneyRequest.ts index e7b163ab7c8f..e67f6db20d90 100644 --- a/src/libs/actions/IOU/UpdateMoneyRequest.ts +++ b/src/libs/actions/IOU/UpdateMoneyRequest.ts @@ -107,7 +107,6 @@ function updateMoneyRequestDate({ policy, policyTagList: policyTags, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -164,7 +163,6 @@ function updateMoneyRequestBillable({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -215,7 +213,6 @@ function updateMoneyRequestReimbursable({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -268,7 +265,6 @@ function updateMoneyRequestMerchant({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -320,7 +316,6 @@ function updateMoneyRequestAttendees({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, violations, @@ -376,7 +371,6 @@ function updateMoneyRequestTag({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyRecentlyUsedTags, policyCategories, @@ -426,7 +420,6 @@ function updateMoneyRequestTaxAmount({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -482,7 +475,6 @@ function updateMoneyRequestTaxRate({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -556,7 +548,6 @@ function updateMoneyRequestDistance({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -659,7 +650,6 @@ function updateMoneyRequestCategory({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, policyRecentlyUsedCategories, @@ -715,7 +705,6 @@ function updateMoneyRequestDescription({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -794,7 +783,6 @@ function updateMoneyRequestDistanceRate({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories, currentUserAccountIDParam, @@ -874,7 +862,6 @@ function updateMoneyRequestAmountAndCurrency({ policy, policyTagList, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(parentReport?.policyID), policyCategories: policyCategories ?? null, allowNegative, @@ -1424,7 +1411,6 @@ function getUpdateMoneyRequestParams(params: GetUpdateMoneyRequestParamsType): U onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport?.reportID}`, // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated value: buildNextStepNew({ report: moneyRequestReport, predictedNextStatus: iouReport?.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index fcdc8baa8072..7d34480e29d7 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -520,7 +520,6 @@ function getMoneyRequestPolicyTags({ (moneyRequestReportID ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${moneyRequestReportID}`]?.policyID : undefined) ?? parentChatReport?.policyID ?? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${participant.reportID}`]?.policyID; - // eslint-disable-next-line @typescript-eslint/no-deprecated return getPolicyTagsData(iouReportPolicyID) ?? {}; } @@ -1048,7 +1047,6 @@ function buildOnyxDataForTestDriveIOU( transactionID: testDriveIOUParams.transaction.transactionID, reportActionID: testDriveIOUParams.iouOptimisticParams.action.reportActionID, }); - // eslint-disable-next-line @typescript-eslint/no-deprecated const text = Localize.translateLocal('testDrive.employeeInviteMessage', personalDetailsList?.[deprecatedUserAccountID]?.firstName ?? ''); // delegateAccountIDParam: will be threaded in PR 15; buildOptimisticAddCommentReportAction falls back to module-level Onyx.connect value (https://github.com/Expensify/App/issues/66425) const textComment = buildOptimisticAddCommentReportAction({ @@ -1755,7 +1753,6 @@ function buildOnyxDataForMoneyRequest(moneyRequestParams: BuildOnyxDataForMoneyR key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iou.report.reportID}`, onyxMethod: Onyx.METHOD.SET, // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated value: buildNextStepNew({ report: iou.report, predictedNextStatus: iou.report.statusNum ?? CONST.REPORT.STATE_NUM.OPEN, @@ -2174,7 +2171,6 @@ function getMoneyRequestInformation(moneyRequestInformation: MoneyRequestInforma iouReport.statusNum ?? (policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.OPEN); const hasViolations = hasViolationsReportUtils(iouReport.reportID, transactionViolations, currentUserAccountIDParam, currentUserEmailParam); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: iouReport, predictedNextStatus, @@ -2728,11 +2724,9 @@ export { getRecentAttendees, getReceiptError, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) and getPolicyRecentlyUsedTagsData (https://github.com/Expensify/App/issues/71491) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated getPolicyTagsData, getSearchOnyxUpdate, getPolicyTags, - // eslint-disable-next-line @typescript-eslint/no-deprecated getMoneyRequestPolicyTags, setMoneyRequestTimeRate, setMoneyRequestTimeCount, diff --git a/src/libs/actions/InputFocus/index.website.ts b/src/libs/actions/InputFocus/index.website.ts index 3db375f65b79..127d1d264fa3 100644 --- a/src/libs/actions/InputFocus/index.website.ts +++ b/src/libs/actions/InputFocus/index.website.ts @@ -22,7 +22,6 @@ function composerFocusKeepFocusOn(ref: HTMLElement, isFocused: boolean, modal: M if (!isFocused && !onyxFocused && !modal.willAlertModalBecomeVisible && !modal.isVisible && refSave) { if (!ReportActionComposeFocusManager.isFocused()) { // Focusing will fail when it is called immediately after closing modal so we call it after interaction. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { refSave?.focus(); }); diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts index 61bcf6fd27ba..466189ae90dd 100644 --- a/src/libs/actions/Link.ts +++ b/src/libs/actions/Link.ts @@ -277,7 +277,6 @@ function openReportFromDeepLink( } // Navigate to the report after sign-in/sign-up. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { waitForUserSignIn().then(() => { // Subscribe to onboarding data using connectWithoutView to determine if user has completed the onboarding flow without affecting UI diff --git a/src/libs/actions/MergeTransaction.ts b/src/libs/actions/MergeTransaction.ts index 505bc043ac61..e6bcdf7adc98 100644 --- a/src/libs/actions/MergeTransaction.ts +++ b/src/libs/actions/MergeTransaction.ts @@ -273,7 +273,6 @@ function getOnyxTargetTransactionData({ policy, policyTagList: policyTags, // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - // eslint-disable-next-line @typescript-eslint/no-deprecated reportPolicyTags: getPolicyTagsData(targetTransactionThreadParentReport?.policyID), policyCategories, violations: targetTransactionViolations ?? [], diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 888e10bc363f..93fe0f71aed2 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -921,7 +921,6 @@ function setWorkspaceApprovalMode( const nextStepKey: `${typeof ONYXKEYS.COLLECTION.NEXT_STEP}${string}` = `${ONYXKEYS.COLLECTION.NEXT_STEP}${reportID}`; const currentNextStep: OnyxEntry | null = resolvedReportNextSteps[nextStepKey] ?? null; const hasViolations = ReportUtils.hasViolations(reportID, resolvedTransactionViolations, currentUserAccountID, currentUserEmail, undefined, undefined, report, updatedPolicy); - // eslint-disable-next-line @typescript-eslint/no-deprecated -- Next step generation uses deprecated "ReportNextStepDeprecated" types (still in active use). const optimisticNextStep = buildNextStepNew({ report, policy: updatedPolicy, @@ -2193,7 +2192,6 @@ function getDisplayNameForWorkspace(email: string, displayNameOverride?: string) const domain = emailParts.at(1) ?? ''; const isSMSDomain = `@${domain}` === CONST.SMS.DOMAIN; if (isSMSDomain) { - // eslint-disable-next-line @typescript-eslint/no-deprecated return translateLocal('workspace.new.myGroupWorkspace', {}); } diff --git a/src/libs/actions/Report/index.ts b/src/libs/actions/Report/index.ts index 0ff89bfa98c8..0b9bbced4df2 100644 --- a/src/libs/actions/Report/index.ts +++ b/src/libs/actions/Report/index.ts @@ -1918,7 +1918,6 @@ function createGroupChat( }; // Clear group chat data after navigation dismissed so we don't see stale data - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearGroupChat(); }); @@ -3320,7 +3319,6 @@ function updateReportField({ const predictedNextStatus = policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.OPEN; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report, predictedNextStatus, @@ -3728,7 +3726,6 @@ function buildNewReportOptimisticData( }; // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: optimisticReportData, predictedNextStatus: CONST.REPORT.STATUS_NUM.OPEN, @@ -4124,7 +4121,6 @@ function navigateToConciergeChatAndDeleteReport( } // TODO: allPersonalDetails fallback should be removed in follow-up PRs https://github.com/Expensify/App/issues/73656 navigateToConciergeChat(conciergeReportID, introSelected, currentUserAccountID, isSelfTourViewed, betas, false, undefined, undefined, undefined, personalDetails ?? allPersonalDetails); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteReport(reportID, shouldDeleteChildReports); }); @@ -6175,7 +6171,6 @@ function deleteAppReport({ const updatedReportAction = { ...reportAction, originalMessage: { - // eslint-disable-next-line @typescript-eslint/no-deprecated ...reportAction.originalMessage, IOUReportID: CONST.REPORT.UNREPORTED_REPORT_ID, type: CONST.IOU.TYPE.TRACK, @@ -6848,7 +6843,6 @@ function navigateToTrainingModal(isChangePolicyTrainingModalDismissed: boolean) return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.CHANGE_POLICY_EDUCATIONAL.path)); }); @@ -6967,7 +6961,6 @@ function buildOptimisticChangePolicyData( if (newStatusNum != null && newStatusNum !== undefined) { // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: {...report, policyID: policy.id}, predictedNextStatus: newStatusNum, diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index a5a44a83e43d..1a33d1e5ccf5 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -1408,7 +1408,6 @@ function waitForUserSignIn(): Promise { } function handleExitToNavigation(exitTo: Route) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { waitForUserSignIn().then(() => { Navigation.waitForProtectedRoutes().then(() => { diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts index 22cc60fc890d..346491d73125 100644 --- a/src/libs/actions/Task.ts +++ b/src/libs/actions/Task.ts @@ -374,7 +374,6 @@ function createTaskAndNavigate(params: CreateTaskAndNavigateParams) { API.write(WRITE_COMMANDS.CREATE_TASK, parameters, {optimisticData, successData, failureData}); if (!isCreatedUsingMarkdown) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearOutTaskInfo(); }); diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 3afc2116401f..6250b559ab32 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -523,7 +523,6 @@ function dismissDuplicateTransactionViolation({ ({violations}) => violations.filter((violation) => violation.name !== CONST.VIOLATIONS.DUPLICATED_TRANSACTION).length, ); // buildOptimisticNextStep is used in parallel - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: expenseReport, predictedNextStatus: expenseReport?.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, @@ -1621,7 +1620,6 @@ function changeTransactionsReport({ const shouldUseUnreportedNextStepKey = reportID === CONST.REPORT.UNREPORTED_REPORT_ID && isDestinationReport; const nextStepOnyxReportID = shouldUseUnreportedNextStepKey ? reportID : affectedReportID; - // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepForCollection = buildNextStepNew({ report: updatedReport, policy, diff --git a/src/libs/actions/TwoFactorAuthActions.ts b/src/libs/actions/TwoFactorAuthActions.ts index 5598dbc3ce98..241c47f9c543 100644 --- a/src/libs/actions/TwoFactorAuthActions.ts +++ b/src/libs/actions/TwoFactorAuthActions.ts @@ -25,7 +25,6 @@ function setCodesAreCopied() { function quitAndNavigateBack(backTo?: Route) { Navigation.goBack(backTo); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(clearTwoFactorAuthData); } diff --git a/src/libs/actions/replaceOptimisticReportWithActualReport.ts b/src/libs/actions/replaceOptimisticReportWithActualReport.ts index 9b7f97907149..150f65a6827d 100644 --- a/src/libs/actions/replaceOptimisticReportWithActualReport.ts +++ b/src/libs/actions/replaceOptimisticReportWithActualReport.ts @@ -83,7 +83,6 @@ function replaceOptimisticReportWithActualReport(report: Report, draftReportComm } } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { // It is possible that we optimistically created a DM/group-DM for a set of users for which a report already exists. // Or we optimistically created a transaction thread chat report for an IOU report action that already has an associated child chat report. diff --git a/src/libs/fileDownload/getImageManipulator/index.native.ts b/src/libs/fileDownload/getImageManipulator/index.native.ts index c50db520a37d..9d9e3e4d8405 100644 --- a/src/libs/fileDownload/getImageManipulator/index.native.ts +++ b/src/libs/fileDownload/getImageManipulator/index.native.ts @@ -3,7 +3,6 @@ import type {FileObject} from '@src/types/utils/Attachment'; import type ImageManipulatorConfig from './type'; export default function getImageManipulator({fileUri, width, height, type, fileName}: ImageManipulatorConfig): Promise { - // eslint-disable-next-line @typescript-eslint/no-deprecated return manipulateAsync(fileUri ?? '', [{resize: {width, height}}]).then((result) => ({ uri: result.uri, width: result.width, diff --git a/src/libs/fileDownload/getImageManipulator/index.ts b/src/libs/fileDownload/getImageManipulator/index.ts index fc3bc0ee78e3..87319978caa8 100644 --- a/src/libs/fileDownload/getImageManipulator/index.ts +++ b/src/libs/fileDownload/getImageManipulator/index.ts @@ -2,7 +2,6 @@ import {manipulateAsync} from 'expo-image-manipulator'; import type ImageManipulatorConfig from './type'; export default function getImageManipulator({fileUri, width, height, fileName}: ImageManipulatorConfig): Promise { - // eslint-disable-next-line @typescript-eslint/no-deprecated return manipulateAsync(fileUri ?? '', [{resize: {width, height}}]).then((result) => fetch(result.uri) .then((res) => res.blob()) diff --git a/src/libs/focusEditAfterCancelDelete/index.native.ts b/src/libs/focusEditAfterCancelDelete/index.native.ts index 0721e29a7de2..c4d4ff93733c 100755 --- a/src/libs/focusEditAfterCancelDelete/index.native.ts +++ b/src/libs/focusEditAfterCancelDelete/index.native.ts @@ -3,7 +3,6 @@ import {InteractionManager} from 'react-native'; import type FocusEditAfterCancelDelete from './types'; const focusEditAfterCancelDelete: FocusEditAfterCancelDelete = (textInputRef) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => textInputRef?.focus()); }; diff --git a/src/pages/Debug/ReportAction/DebugReportActionPage.tsx b/src/pages/Debug/ReportAction/DebugReportActionPage.tsx index 34c606d17550..dd237e921dc0 100644 --- a/src/pages/Debug/ReportAction/DebugReportActionPage.tsx +++ b/src/pages/Debug/ReportAction/DebugReportActionPage.tsx @@ -64,7 +64,6 @@ function DebugReportActionPage({ Navigation.goBack(); // We need to wait for navigation animations to finish before deleting an action, // otherwise the user will see a not found page briefly. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Debug.mergeDebugData(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {[reportActionID]: null}); }); diff --git a/src/pages/Debug/Transaction/DebugTransactionPage.tsx b/src/pages/Debug/Transaction/DebugTransactionPage.tsx index f3eff67f0762..c97a5e512b94 100644 --- a/src/pages/Debug/Transaction/DebugTransactionPage.tsx +++ b/src/pages/Debug/Transaction/DebugTransactionPage.tsx @@ -56,7 +56,6 @@ function DebugTransactionPage({ Navigation.goBack(); // We need to wait for navigation animations to finish before deleting a transaction, // otherwise the user will see a not found page briefly. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Debug.setDebugData(`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, null); }); diff --git a/src/pages/Debug/TransactionViolation/DebugTransactionViolationPage.tsx b/src/pages/Debug/TransactionViolation/DebugTransactionViolationPage.tsx index 849d560eca7a..4cdd1ef31e9b 100644 --- a/src/pages/Debug/TransactionViolation/DebugTransactionViolationPage.tsx +++ b/src/pages/Debug/TransactionViolation/DebugTransactionViolationPage.tsx @@ -50,7 +50,6 @@ function DebugTransactionViolationPage({ Navigation.goBack(); // We need to wait for navigation animations to finish before deleting a violation, // otherwise the user will see a not found page briefly. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Debug.setDebugData(`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`, updatedTransactionViolations); }); diff --git a/src/pages/MultifactorAuthentication/BiometricsTestPage.tsx b/src/pages/MultifactorAuthentication/BiometricsTestPage.tsx index ed25d200e469..a11d070a2014 100644 --- a/src/pages/MultifactorAuthentication/BiometricsTestPage.tsx +++ b/src/pages/MultifactorAuthentication/BiometricsTestPage.tsx @@ -22,7 +22,6 @@ function MultifactorAuthenticationBiometricsTestPage() { } // The reason for using it, despite it being deprecated: https://github.com/Expensify/App/pull/79473#discussion_r2745847379 - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => executeScenario(CONST.MULTIFACTOR_AUTHENTICATION.SCENARIO.BIOMETRICS_TEST)); // This should only fire once - on mount, or if the user switches from offline to online. diff --git a/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx b/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx index 39ee458c9ae2..1ad31145bf9f 100644 --- a/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx +++ b/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx @@ -240,7 +240,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin }); // Avoid creating new WS because onboardingPolicyID is cleared before unmounting - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setOnboardingAdminsChatReportID(); setOnboardingPolicyID(); diff --git a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx index e45bf8eedf32..8ff529ef084d 100644 --- a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx +++ b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx @@ -93,7 +93,6 @@ function BankInfo({onBackButtonPress, policyID, setUSDBankAccountStep}: BankInfo }; const bodyContent = setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID ? plaidSubSteps : manualSubSteps; - // eslint-disable-next-line @typescript-eslint/no-deprecated const {componentToRender: SubStep, isEditing, screenIndex, nextScreen, prevScreen, moveTo} = useSubStep({bodyContent, startFrom: 0, onFinished: submit}); // Some services user connects to via Plaid return dummy account numbers and routing numbers e.g. Chase diff --git a/src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx b/src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx index 48e31dd63b53..83e6e31c1616 100644 --- a/src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx +++ b/src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx @@ -110,7 +110,6 @@ function BeneficialOwnersStep({onBackButtonPress}: BeneficialOwnersStepProps) { moveTo, resetScreenIndex, goToTheLastStep, - // eslint-disable-next-line @typescript-eslint/no-deprecated } = useSubStep({ bodyContent, startFrom: 0, diff --git a/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx b/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx index 0eb937a1050c..be7ff00b0080 100644 --- a/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx +++ b/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx @@ -93,7 +93,6 @@ function BusinessInfo({onBackButtonPress}: BusinessInfoProps) { prevScreen, moveTo, goToTheLastStep, - // eslint-disable-next-line @typescript-eslint/no-deprecated } = useSubStep({bodyContent, startFrom, onFinished: () => submit(true), onNextSubStep: () => submit(false)}); const handleBackButtonPress = () => { diff --git a/src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx b/src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx index 5d544521ba21..8b99de40b19c 100644 --- a/src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx +++ b/src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx @@ -45,7 +45,6 @@ function CompleteVerification({onBackButtonPress}: CompleteVerificationProps) { ); }, [bankAccountID, values.isAuthorizedToUseBankAccount, values.certifyTrueInformation, values.acceptTermsAndConditions, policyID, lastPaymentMethod]); - // eslint-disable-next-line @typescript-eslint/no-deprecated const {componentToRender: SubStep, isEditing, screenIndex, nextScreen, prevScreen, moveTo, goToTheLastStep} = useSubStep({bodyContent, startFrom: 0, onFinished: submit}); const handleBackButtonPress = () => { diff --git a/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx b/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx index 378d04406214..bd548f912ff0 100644 --- a/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx +++ b/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx @@ -56,7 +56,6 @@ function PersonalInfo({onBackButtonPress, ref}: PersonalInfoProps) { prevScreen, moveTo, goToTheLastStep, - // eslint-disable-next-line @typescript-eslint/no-deprecated } = useSubStep({bodyContent, startFrom, onFinished: () => submit(true), onNextSubStep: () => submit(false)}); const handleBackButtonPress = () => { diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index c4a58f913d02..a8bcd8b20792 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -1061,7 +1061,6 @@ function ReportDetailsPage({policy, report, route, reportMetadata, reportLoading navigateToTargetUrl(); // Delay deletion until the RHP close animation finishes to prevent a brief // "Not Found" flash inside the animating-out panel on slower devices. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteTransaction(); }); diff --git a/src/pages/ReportParticipantsPage.tsx b/src/pages/ReportParticipantsPage.tsx index 61fb59679866..052fd3f0c77d 100755 --- a/src/pages/ReportParticipantsPage.tsx +++ b/src/pages/ReportParticipantsPage.tsx @@ -172,7 +172,6 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) { const accountIDsToRemove = selectedMembers.filter((id) => id !== currentUserAccountID); removeFromGroupChat(report, accountIDsToRemove); setSearchValue(''); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedMembers([]); clearUserSearchPhrase(); diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index 1104d41bf4ea..7fa9959e58ad 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -152,7 +152,6 @@ function RoomMembersPage({report, policy}: RoomMembersPageProps) { removeFromRoom(report, selectedMembers); } setSearchValue(''); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedMembers([]); clearUserSearchPhrase(); diff --git a/src/pages/Search/SearchMoneyRequestReportPage.tsx b/src/pages/Search/SearchMoneyRequestReportPage.tsx index b67fb6248ca0..538496f27f3f 100644 --- a/src/pages/Search/SearchMoneyRequestReportPage.tsx +++ b/src/pages/Search/SearchMoneyRequestReportPage.tsx @@ -107,7 +107,6 @@ function SearchMoneyRequestReportPage({route}: SearchMoneyRequestPageProps) { return; } // Clear the URL only after we navigate away to avoid a brief Not Found flash. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { clearDeleteTransactionNavigateBackUrl(); diff --git a/src/pages/Search/SearchTransactionsChangeReport.tsx b/src/pages/Search/SearchTransactionsChangeReport.tsx index d26f8a3fd0cc..8950abfc9cb8 100644 --- a/src/pages/Search/SearchTransactionsChangeReport.tsx +++ b/src/pages/Search/SearchTransactionsChangeReport.tsx @@ -197,7 +197,6 @@ function SearchTransactionsChangeReport() { allTransactions: transactions, policyTagList, }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearSelectedTransactions(); }); diff --git a/src/pages/Share/ShareRootPage.tsx b/src/pages/Share/ShareRootPage.tsx index 0bea70c00041..530cf7e8fa18 100644 --- a/src/pages/Share/ShareRootPage.tsx +++ b/src/pages/Share/ShareRootPage.tsx @@ -177,7 +177,6 @@ function ShareRootPage() { const onTabSelectFocusHandler = ({index}: {index: number}) => { // We runAfterInteractions since the function is called in the animate block on web-based // implementation, this fixes an animation glitch and matches the native internal delay - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { // Chat tab (0) / Room tab (1) according to OnyxTabNavigator (see below) if (index === 0) { diff --git a/src/pages/inbox/DeleteTransactionNavigateBackHandler.tsx b/src/pages/inbox/DeleteTransactionNavigateBackHandler.tsx index f835e2fc2f5d..204931377050 100644 --- a/src/pages/inbox/DeleteTransactionNavigateBackHandler.tsx +++ b/src/pages/inbox/DeleteTransactionNavigateBackHandler.tsx @@ -24,7 +24,6 @@ function DeleteTransactionNavigateBackHandler() { return; } // Clear the URL only after we navigate away to avoid a brief Not Found flash. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { clearDeleteTransactionNavigateBackUrl(); diff --git a/src/pages/inbox/ReportFetchHandler.tsx b/src/pages/inbox/ReportFetchHandler.tsx index 6feb0dc0fe68..89b970954842 100644 --- a/src/pages/inbox/ReportFetchHandler.tsx +++ b/src/pages/inbox/ReportFetchHandler.tsx @@ -234,7 +234,6 @@ function ReportFetchHandler() { }, [reportID, isFocused, isInSidePanel]); useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const interactionTask = InteractionManager.runAfterInteractions(() => { setShouldShowComposeInput(true); }); @@ -281,10 +280,8 @@ function ReportFetchHandler() { // any `pendingFields.createChat` or `pendingFields.addWorkspaceRoom` fields are set to null. // Existing reports created will have empty fields for `pendingFields`. const didCreateReportSuccessfully = !report?.pendingFields || (!report?.pendingFields.addWorkspaceRoom && !report?.pendingFields.createChat); - // eslint-disable-next-line @typescript-eslint/no-deprecated let interactionTask: ReturnType | null = null; if (!didSubscribeToReportLeavingEvents.current && didCreateReportSuccessfully) { - // eslint-disable-next-line @typescript-eslint/no-deprecated interactionTask = InteractionManager.runAfterInteractions(() => { subscribeToReportLeavingEvents(reportIDFromRoute, currentUserAccountID); didSubscribeToReportLeavingEvents.current = true; diff --git a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx index 23a3cc766fe4..50944b8de0b9 100755 --- a/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsx @@ -326,7 +326,6 @@ function BaseReportActionContextMenu({ if (isAnonymousUser() && !isAnonymousAction) { hideContextMenu(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { signOutAndRedirectToSignIn(); }); diff --git a/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx b/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx index ca78eb8814d1..26d667660912 100644 --- a/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx @@ -884,7 +884,6 @@ const ContextMenuActions: ContextMenuAction[] = [ const taskPreviewMessage = getTaskCreatedMessage(translate, reportAction, childReport, true); Clipboard.setString(taskPreviewMessage); } else if (isMemberChangeAction(reportAction)) { - // eslint-disable-next-line @typescript-eslint/no-deprecated const logMessage = getMemberChangeMessageFragment(translate, reportAction, getReportNameDeprecated).html ?? ''; setClipboardMessage(logMessage); } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_NAME) { diff --git a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx index 7730e8b655e0..4e10aa885797 100644 --- a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -410,7 +410,6 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro hash: currentSearchHash, }); } else if (reportAction) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteReportComment( report, diff --git a/src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index e85b4eef89fe..449702c7085a 100644 --- a/src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/inbox/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -585,7 +585,6 @@ function ComposerWithSuggestions({ syncSelectionWithOnChangeTextRef.current = null; // ensure that selection is set imperatively after all state changes are effective - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { // note: this implementation is only available on non-web RN, thus the wrapping // 'if' block contains a redundant (since the ref is only used on iOS) platform check @@ -657,7 +656,6 @@ function ComposerWithSuggestions({ } delayedAutoFocusRouteKeyRef.current = route.key; - // eslint-disable-next-line @typescript-eslint/no-deprecated const task = InteractionManager.runAfterInteractions(() => { focus(true); }); diff --git a/src/pages/inbox/report/ReportActionItemMessage.tsx b/src/pages/inbox/report/ReportActionItemMessage.tsx index ac908369af85..977526bc1f83 100644 --- a/src/pages/inbox/report/ReportActionItemMessage.tsx +++ b/src/pages/inbox/report/ReportActionItemMessage.tsx @@ -57,7 +57,6 @@ function ReportActionItemMessage({action, displayAsGroup, reportID, style, isHid if (isMemberChangeAction(action)) { // This will be fixed: https://github.com/Expensify/App/issues/76852 - // eslint-disable-next-line @typescript-eslint/no-deprecated const fragment = getMemberChangeMessageFragment(translate, action, getReportName); return ( diff --git a/src/pages/inbox/report/ReportActionItemMessageEdit.tsx b/src/pages/inbox/report/ReportActionItemMessageEdit.tsx index 45432752a73f..34062fa598a1 100644 --- a/src/pages/inbox/report/ReportActionItemMessageEdit.tsx +++ b/src/pages/inbox/report/ReportActionItemMessageEdit.tsx @@ -289,7 +289,6 @@ function ReportActionItemMessageEdit({ if (isActive()) { ReportActionComposeFocusManager.clear(true); // Wait for report action compose re-mounting on mWeb - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => ReportActionComposeFocusManager.focus()); } @@ -545,7 +544,6 @@ function ReportActionItemMessageEdit({ ReportActionComposeFocusManager.editComposerRef.current = textInputRef.current; } startScrollBlock(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { reportScrollManager.scrollToIndex(index, true); diff --git a/src/pages/inbox/report/ReportActionsList.tsx b/src/pages/inbox/report/ReportActionsList.tsx index 36b2bd056389..f0141f4d2fd3 100644 --- a/src/pages/inbox/report/ReportActionsList.tsx +++ b/src/pages/inbox/report/ReportActionsList.tsx @@ -532,7 +532,6 @@ function ReportActionsList({ return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (shouldScrollToEndAfterLayout) { return; @@ -551,7 +550,6 @@ function ReportActionsList({ } const prevSorted = lastAction?.reportActionID ? prevSortedVisibleReportActionsObjects[lastAction?.reportActionID] : null; if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_TRACK_EXPENSE_WHISPER && !prevSorted) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { reportScrollManager.scrollToBottom(); }); @@ -564,7 +562,6 @@ function ReportActionsList({ const scrollToBottomForCurrentUserAction = useCallback( (isFromCurrentUser: boolean, action?: OnyxTypes.ReportAction) => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { // If a new comment is added and it's from the current user scroll to the bottom otherwise leave the user positioned where // they are now in the list. @@ -655,7 +652,6 @@ function ReportActionsList({ if (lastIOUActionWithError?.reportActionID === prevLastIOUActionWithError?.reportActionID) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { reportScrollManager.scrollToBottom(); }); @@ -899,7 +895,6 @@ function ReportActionsList({ return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => requestAnimationFrame(() => loadNewerChats(false))); }, [loadNewerChats]); diff --git a/src/pages/inbox/report/UserTypingEventListener.tsx b/src/pages/inbox/report/UserTypingEventListener.tsx index 8c9461a55723..80a3479747a0 100644 --- a/src/pages/inbox/report/UserTypingEventListener.tsx +++ b/src/pages/inbox/report/UserTypingEventListener.tsx @@ -32,7 +32,6 @@ function UserTypingEventListener({report}: UserTypingEventListenerProps) { // unsubscribe from report typing events when the component unmounts didSubscribeToReportTypingEvents.current = false; - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { unsubscribeFromReportChannel(reportID); }); @@ -46,7 +45,6 @@ function UserTypingEventListener({report}: UserTypingEventListenerProps) { if (route?.params?.reportID !== reportID) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated let interactionTask: ReturnType | null = null; if (isFocused) { // Ensures subscription event succeeds when the report/workspace room is created optimistically. @@ -56,7 +54,6 @@ function UserTypingEventListener({report}: UserTypingEventListenerProps) { const didCreateReportSuccessfully = !report.pendingFields || (!report.pendingFields.addWorkspaceRoom && !report.pendingFields.createChat); if (!didSubscribeToReportTypingEvents.current && didCreateReportSuccessfully) { - // eslint-disable-next-line @typescript-eslint/no-deprecated interactionTask = InteractionManager.runAfterInteractions(() => { subscribeToReportTypingEvents(reportID, currentUserAccountID); didSubscribeToReportTypingEvents.current = true; @@ -67,7 +64,6 @@ function UserTypingEventListener({report}: UserTypingEventListenerProps) { if (topmostReportId !== reportID && didSubscribeToReportTypingEvents.current) { didSubscribeToReportTypingEvents.current = false; - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { unsubscribeFromReportChannel(reportID); }); diff --git a/src/pages/iou/SplitExpensePage.tsx b/src/pages/iou/SplitExpensePage.tsx index dc25c1848197..dac86c889060 100644 --- a/src/pages/iou/SplitExpensePage.tsx +++ b/src/pages/iou/SplitExpensePage.tsx @@ -476,7 +476,6 @@ function SplitExpensePage({route}: SplitExpensePageProps) { return; } Keyboard.dismiss(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { initDraftSplitExpenseDataForEdit(draftTransaction, item.transactionID, item.reportID ?? reportID); Navigation.navigate(ROUTES.SPLIT_EXPENSE_EDIT.getRoute(item.reportID ?? reportID, originalTransactionID, item.transactionID, Navigation.getActiveRoute())); diff --git a/src/pages/iou/request/ParticipantSearchResults.tsx b/src/pages/iou/request/ParticipantSearchResults.tsx index 1bceda33abb5..119097dd08c9 100644 --- a/src/pages/iou/request/ParticipantSearchResults.tsx +++ b/src/pages/iou/request/ParticipantSearchResults.tsx @@ -426,7 +426,6 @@ function ParticipantSearchResults({ // `InteractionManager.runAfterInteractions` is marked deprecated in RN types but remains the // supported primitive for deferring work until native animations/gestures settle. No // replacement exists in the RN API we can migrate to today. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(importAndSaveContacts); }; diff --git a/src/pages/iou/request/step/IOURequestStepCategory.tsx b/src/pages/iou/request/step/IOURequestStepCategory.tsx index 415e22fd9ff1..248755797457 100644 --- a/src/pages/iou/request/step/IOURequestStepCategory.tsx +++ b/src/pages/iou/request/step/IOURequestStepCategory.tsx @@ -211,7 +211,6 @@ function IOURequestStepCategory({ if (!policy?.areCategoriesEnabled) { enablePolicyCategories({...policyData, categories: policyCategories}, true, false); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.navigate( ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute( diff --git a/src/pages/iou/request/step/IOURequestStepDescription.tsx b/src/pages/iou/request/step/IOURequestStepDescription.tsx index 729c82c2ef21..f9d6c73c200a 100644 --- a/src/pages/iou/request/step/IOURequestStepDescription.tsx +++ b/src/pages/iou/request/step/IOURequestStepDescription.tsx @@ -189,7 +189,6 @@ function IOURequestStepDescription({ useDiscardChangesConfirmation({ onCancel: () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { inputRef.current?.focus(); }); diff --git a/src/pages/iou/request/step/IOURequestStepDestination.tsx b/src/pages/iou/request/step/IOURequestStepDestination.tsx index 750b5c680f8c..18c504e1e191 100644 --- a/src/pages/iou/request/step/IOURequestStepDestination.tsx +++ b/src/pages/iou/request/step/IOURequestStepDestination.tsx @@ -219,7 +219,6 @@ function IOURequestStepDestination({ success style={[styles.w100]} onPress={() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.navigate(ROUTES.WORKSPACE_PER_DIEM.getRoute(policy.id, Navigation.getActiveRoute())); }); diff --git a/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx b/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx index cb0782c7e0b8..fba2d9e507aa 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx @@ -628,7 +628,6 @@ function IOURequestStepDistanceOdometer({ useDiscardChangesConfirmation({ onCancel: () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { lastFocusedInputRef.current?.focus(); }); diff --git a/src/pages/iou/request/step/IOURequestStepMerchant.tsx b/src/pages/iou/request/step/IOURequestStepMerchant.tsx index 54d673aa9246..beedbce677ac 100644 --- a/src/pages/iou/request/step/IOURequestStepMerchant.tsx +++ b/src/pages/iou/request/step/IOURequestStepMerchant.tsx @@ -150,7 +150,6 @@ function IOURequestStepMerchant({ useDiscardChangesConfirmation({ onCancel: () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { inputRef.current?.focus(); }); diff --git a/src/pages/iou/request/step/IOURequestStepReport.tsx b/src/pages/iou/request/step/IOURequestStepReport.tsx index 9e77ccaf79c3..86969eab925c 100644 --- a/src/pages/iou/request/step/IOURequestStepReport.tsx +++ b/src/pages/iou/request/step/IOURequestStepReport.tsx @@ -166,7 +166,6 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) { } handleGoBack(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.setNavigationActionToMicrotaskQueue(() => { setTransactionReport( @@ -225,7 +224,6 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) { return; } Navigation.dismissToSuperWideRHP(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { const policyTagList = personalPolicyID ? allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${personalPolicyID}`] : {}; changeTransactionsReport({ diff --git a/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx index 5d8243b104df..f3009a6c89ab 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/ReceiptView/index.tsx @@ -62,7 +62,6 @@ function ReceiptView({route}: ReceiptViewProps) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { if (currentReceipt.transactionID === CONST.IOU.OPTIMISTIC_TRANSACTION_ID) { if (receipts.length === 1) { diff --git a/src/pages/iou/request/step/IOURequestStepScan/hooks/useMobileReceiptScan.ts b/src/pages/iou/request/step/IOURequestStepScan/hooks/useMobileReceiptScan.ts index 74b57db6da89..2e16385e0187 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/hooks/useMobileReceiptScan.ts +++ b/src/pages/iou/request/step/IOURequestStepScan/hooks/useMobileReceiptScan.ts @@ -87,7 +87,6 @@ function useMobileReceiptScan({ } function dismissMultiScanEducationalPopup() { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { dismissProductTraining(CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.MULTI_SCAN_EDUCATIONAL_MODAL); setShouldShowMultiScanEducationalPopup(false); diff --git a/src/pages/iou/request/step/IOURequestStepSubrate.tsx b/src/pages/iou/request/step/IOURequestStepSubrate.tsx index cf8d55850b7e..df96e07646ef 100644 --- a/src/pages/iou/request/step/IOURequestStepSubrate.tsx +++ b/src/pages/iou/request/step/IOURequestStepSubrate.tsx @@ -240,7 +240,6 @@ function IOURequestStepSubrate({ items={validOptions} onValueChange={(value) => { setSubrateValue(value as string); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { textInputRef.current?.focus(); }); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index b5ed2ab4708f..350f62b44c11 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -198,7 +198,6 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { const turnOnDeleteModal = useCallback(() => { const openDeleteModal = async () => { const result = await showRemoveContactMethodModal(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { validateCodeFormRef.current?.focusLastSelected?.(); }); @@ -210,7 +209,6 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { }; if (canUseTouchScreen()) { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(openDeleteModal); Keyboard.dismiss(); return; @@ -314,7 +312,6 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { validateCodeFormRef.current?.focus?.(); }); diff --git a/src/pages/settings/Profile/CustomStatus/StatusPage.tsx b/src/pages/settings/Profile/CustomStatus/StatusPage.tsx index 48f2dcc3baf4..f42f239b2907 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusPage.tsx +++ b/src/pages/settings/Profile/CustomStatus/StatusPage.tsx @@ -93,13 +93,9 @@ function StatusPage() { const navigateBackToPreviousScreenTask = useRef<{ then: ( - // eslint-disable-next-line @typescript-eslint/no-deprecated onfulfilled?: () => typeof InteractionManager.runAfterInteractions, - // eslint-disable-next-line @typescript-eslint/no-deprecated onrejected?: () => typeof InteractionManager.runAfterInteractions, - // eslint-disable-next-line @typescript-eslint/no-deprecated ) => Promise; - // eslint-disable-next-line @typescript-eslint/no-deprecated done: (...args: Array) => typeof InteractionManager.runAfterInteractions; cancel: () => void; } | null>(null); @@ -133,7 +129,6 @@ function StatusPage() { emojiCode: !emojiCode && statusText ? initialEmoji : emojiCode, clearAfter: clearAfterTime !== CONST.CUSTOM_STATUS_TYPES.NEVER ? clearAfterTime : '', }); - // eslint-disable-next-line @typescript-eslint/no-deprecated navigateBackToPreviousScreenTask.current = InteractionManager.runAfterInteractions(() => { clearDraftCustomStatus(); navigateBackToPreviousScreen(); @@ -154,7 +149,6 @@ function StatusPage() { }); formRef.current?.resetForm({[INPUT_IDS.EMOJI_CODE]: ''}); - // eslint-disable-next-line @typescript-eslint/no-deprecated navigateBackToPreviousScreenTask.current = InteractionManager.runAfterInteractions(() => { navigateBackToPreviousScreen(); }); diff --git a/src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx b/src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx index d43b1885c3a4..bd75f5dfe263 100644 --- a/src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx +++ b/src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx @@ -84,7 +84,6 @@ function AccountDetailsPage() { useFocusEffect( useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const task = InteractionManager.runAfterInteractions(() => { if (!validateCodeSent || !email) { return; @@ -99,7 +98,6 @@ function AccountDetailsPage() { useFocusEffect( useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const task = InteractionManager.runAfterInteractions(() => { if (!errorKey || !email) { return; @@ -113,7 +111,6 @@ function AccountDetailsPage() { useFocusEffect( useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const task = InteractionManager.runAfterInteractions(() => { if (privateSubscription?.type !== CONST.SUBSCRIPTION.TYPE.INVOICING) { return; diff --git a/src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx b/src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx index e0471674539f..907dea33ff7c 100644 --- a/src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx +++ b/src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx @@ -122,7 +122,6 @@ function AccountValidatePage() { }); useFocusEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const task = InteractionManager.runAfterInteractions(() => { if (privateSubscription?.type !== CONST.SUBSCRIPTION.TYPE.INVOICING) { return; diff --git a/src/pages/settings/Security/MergeAccounts/MergeResultPage.tsx b/src/pages/settings/Security/MergeAccounts/MergeResultPage.tsx index b0ab55cd722e..0ee61ed9f870 100644 --- a/src/pages/settings/Security/MergeAccounts/MergeResultPage.tsx +++ b/src/pages/settings/Security/MergeAccounts/MergeResultPage.tsx @@ -197,7 +197,6 @@ function MergeResultPage() { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.removeScreenFromNavigationState(SCREENS.SETTINGS.MERGE_ACCOUNTS.ACCOUNT_DETAILS); }); diff --git a/src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx b/src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx index d31f2ac6f00a..b27c1d2b0348 100644 --- a/src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx +++ b/src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx @@ -57,7 +57,6 @@ function ReplaceDeviceVerifyNewPage() { }, [account, account?.twoFactorAuthSecretKey]); const handleInputFocus = () => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { scrollViewRef.current?.scrollToEnd({animated: true}); diff --git a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx index c64f7eb7e44d..3d0ecb8d738a 100644 --- a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx +++ b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx @@ -77,7 +77,6 @@ function VerifyPage({route}: VerifyPageProps) { const scrollViewRef = useRef(null); const handleInputFocus = useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { scrollViewRef.current?.scrollToEnd({animated: true}); diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/PersonalInfo.tsx b/src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/PersonalInfo.tsx index 5e606c3a6eef..986d798d645a 100644 --- a/src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/PersonalInfo.tsx +++ b/src/pages/settings/Wallet/InternationalDepositAccount/PersonalInfo/PersonalInfo.tsx @@ -72,7 +72,6 @@ function PersonalInfoPage() { moveTo, screenIndex, goToTheLastStep, - // eslint-disable-next-line @typescript-eslint/no-deprecated } = useSubStep({ bodyContent: isManual ? bodyContentWithManualSetup : bodyContentWithPlaid, skipSteps, diff --git a/src/pages/signin/LoginForm/BaseLoginForm.tsx b/src/pages/signin/LoginForm/BaseLoginForm.tsx index f331338e5b87..a156bd8ff94a 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.tsx +++ b/src/pages/signin/LoginForm/BaseLoginForm.tsx @@ -218,7 +218,6 @@ function BaseLoginForm({submitBehavior = 'submit', isVisible, ref}: BaseLoginFor // On mobile WebKit browsers, when an input field gains focus, the keyboard appears and the virtual viewport is resized and scrolled to make the input field visible. // This occurs even when there is enough space to display both the input field and the submit button in the current view. // so this change to correct the scroll position when the input field gains focus. - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { htmlDivElementRef(submitContainerRef).current?.scrollIntoView?.({behavior: 'smooth', block: 'end'}); }); diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.native.tsx b/src/pages/signin/SignInPageLayout/BackgroundImage/index.native.tsx index c52f530394c7..b5bbef70af58 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.native.tsx +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.native.tsx @@ -36,7 +36,6 @@ function BackgroundImage({width}: BackgroundImageProps) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated const interactionTask = InteractionManager.runAfterInteractions(() => { setIsInteractionComplete(true); }); diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx b/src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx index 3321d053a622..5959f97d9148 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx @@ -35,7 +35,6 @@ function BackgroundImage({width, isSmallScreen = false}: BackgroundImageProps) { return; } - // eslint-disable-next-line @typescript-eslint/no-deprecated const interactionTask = InteractionManager.runAfterInteractions(() => { setIsInteractionComplete(true); }); diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index 16c67fbf1a5d..922f5d77ba76 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -65,7 +65,6 @@ function NewTaskPage({route}: NewTaskPageProps) { const focusTimeoutRef = useRef(null); useFocusEffect(() => { focusTimeoutRef.current = setTimeout(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { blurActiveElement(); }); diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index 0abc0cd17957..60b1409f9580 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -182,7 +182,6 @@ function TaskAssigneeSelectorModal() { isOptimisticReport, }); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.dismissModalWithReport({reportID: report?.reportID}); }); @@ -195,7 +194,6 @@ function TaskAssigneeSelectorModal() { undefined, // passing null as report is null in this condition isCurrentUser({...option, accountID: option?.accountID ?? CONST.DEFAULT_NUMBER_ID, login: option?.login ?? undefined}, loginList, currentUserEmail), ); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.goBack(ROUTES.NEW_TASK.getRoute(backTo)); }); diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index 2d13f4524d63..33c2d563ea04 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -282,7 +282,6 @@ function WorkspaceMembersPage({personalDetails, route, policy}: WorkspaceMembers } } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedEmployees([]); removeMembers(policy, selectedEmployees, policyMemberEmailsToAccountIDs); diff --git a/src/pages/workspace/WorkspaceNewRoomPage.tsx b/src/pages/workspace/WorkspaceNewRoomPage.tsx index 7cd193ae90d6..210b8bd7e814 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.tsx +++ b/src/pages/workspace/WorkspaceNewRoomPage.tsx @@ -137,7 +137,6 @@ function WorkspaceNewRoomPage({ref}: WorkspaceNewRoomPageProps) { currentUserAccountID, }); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { requestAnimationFrame(() => { addPolicyReport(policyReport); diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index b2ed3acc2df9..d23157e1ce20 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -637,7 +637,6 @@ function WorkspacesListPage() { const duplicateWorkspaceIndex = filteredWorkspaces.findIndex((workspace) => workspace.policyID === duplicatedWSPolicyID); if (duplicateWorkspaceIndex >= 0) { flatlistRef.current?.scrollToIndex({index: duplicateWorkspaceIndex, animated: false}); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { clearDuplicateWorkspace(); }); diff --git a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomListContent.tsx b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomListContent.tsx index 2216014db611..1cf833446c7a 100644 --- a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomListContent.tsx +++ b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomListContent.tsx @@ -51,7 +51,6 @@ function NetSuiteImportAddCustomListContent({policy, draftValues, policyIDParam} const customLists = useMemo(() => config?.syncOptions?.customLists ?? [], [config?.syncOptions]); const handleFinishStep = useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { const updatedCustomLists = customLists.concat([ { diff --git a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomSegmentContent.tsx b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomSegmentContent.tsx index 808c10c0dd0e..d61b5a76c244 100644 --- a/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomSegmentContent.tsx +++ b/src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldNew/NetSuiteImportAddCustomSegmentContent.tsx @@ -55,7 +55,6 @@ function NetSuiteImportAddCustomSegmentContent({policy, policyIDParam, draftValu const values = useMemo(() => getSubstepValues(draftValues), [draftValues]); const startFrom = useMemo(() => getCustomSegmentInitialSubstep(values), [values]); const handleFinishStep = useCallback(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { const updatedCustomSegments = customSegments.concat([ { diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index eedcf14888d0..1b610c373ea8 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -429,7 +429,6 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { ); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedCategories([]); }); diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsPage.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsPage.tsx index 57cff21d96df..1b5b7320fbd6 100644 --- a/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsPage.tsx +++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsPage.tsx @@ -106,7 +106,6 @@ function WorkspaceCompanyCardsSettingsPage({ const feedToOpen = (Object.keys(companyFeeds) as CompanyCardFeedWithDomainID[]).find( (feedWithDomainID) => feedWithDomainID !== selectedFeed && companyFeeds[feedWithDomainID]?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, ); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deleteWorkspaceCompanyCardFeed(policyID, domainOrWorkspaceAccountID, feed, cardIDs, feedToOpen); }); diff --git a/src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx b/src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx index 8c620c5c7996..c1565dc58c93 100644 --- a/src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx +++ b/src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx @@ -144,7 +144,6 @@ function PlaidConnectionStep({feed, policyID, onExit, title}: PlaidConnectionSte JSON.stringify(metadata?.accounts), '', ); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setAssignCardStepAndData({ cardToAssign: { diff --git a/src/pages/workspace/companyCards/assignCard/ConfirmationStep.tsx b/src/pages/workspace/companyCards/assignCard/ConfirmationStep.tsx index 4b14eb92d784..94aea6e9811f 100644 --- a/src/pages/workspace/companyCards/assignCard/ConfirmationStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/ConfirmationStep.tsx @@ -83,7 +83,6 @@ function ConfirmationStep({route}: ConfirmationStepProps) { if (backTo) { Navigation.navigate(backTo); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => clearAssignCardStepAndData()); }, [assignCard?.isAssignmentFinished, backTo]); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 278f9b2ba1ec..4f140e001bbc 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -324,7 +324,6 @@ function PolicyDistanceRatesPage({ deletePolicyDistanceRates(policyID, customUnit, selectedDistanceRates, transactionIDsAffected, transactionViolations); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedDistanceRates([]); }); diff --git a/src/pages/workspace/downgrade/WorkspaceDowngradePage.tsx b/src/pages/workspace/downgrade/WorkspaceDowngradePage.tsx index d17fd7feafc7..fcd4c796ccc6 100644 --- a/src/pages/workspace/downgrade/WorkspaceDowngradePage.tsx +++ b/src/pages/workspace/downgrade/WorkspaceDowngradePage.tsx @@ -67,7 +67,6 @@ function WorkspaceDowngradePage({route}: WorkspaceDowngradePageProps) { Navigation.isNavigationReady().then(() => { Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(targetPolicyID)); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SELECT_FEED.getRoute(targetPolicyID)); }); @@ -81,7 +80,6 @@ function WorkspaceDowngradePage({route}: WorkspaceDowngradePageProps) { setIsDowngradeWarningModalOpen(false); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => dismissModalAndNavigate(policyID)); }; diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx index 63c7b6ba011e..9cecc42b0da4 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx @@ -125,7 +125,6 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail const deactivateCard = () => { setIsDeactivateModalVisible(false); shouldGoBack.current = true; - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { deactivateCardAction(defaultFundID, card); }); diff --git a/src/pages/workspace/members/ImportedMembersPage.tsx b/src/pages/workspace/members/ImportedMembersPage.tsx index 82636f7a9418..859bb4990b9b 100644 --- a/src/pages/workspace/members/ImportedMembersPage.tsx +++ b/src/pages/workspace/members/ImportedMembersPage.tsx @@ -247,7 +247,6 @@ function ImportedMembersPage({route}: ImportedMembersPageProps) { isVisible={spreadsheet?.shouldFinalModalBeOpened && shouldShowConfirmModal && isFocused} closeImportPageAndModal={closeImportPageAndModal} onModalHide={() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => Navigation.goBack(ROUTES.WORKSPACE_MEMBERS.getRoute(policyID))); }} /> diff --git a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx index 2d0a778c5f76..ed57b58122ba 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx @@ -277,7 +277,6 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) { const handleDeletePerDiemRates = () => { deleteWorkspacePerDiemRates(policyID, customUnit, selectedPerDiem); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedPerDiem([]); }); diff --git a/src/pages/workspace/reports/ReportFieldsListValuesPage.tsx b/src/pages/workspace/reports/ReportFieldsListValuesPage.tsx index 330c673486ab..b77ac4b1147b 100644 --- a/src/pages/workspace/reports/ReportFieldsListValuesPage.tsx +++ b/src/pages/workspace/reports/ReportFieldsListValuesPage.tsx @@ -189,7 +189,6 @@ function ReportFieldsListValuesPage({ }); } - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedValues({}); }); diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index a2e9c8d43aea..7382ef4fe4fd 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -499,7 +499,6 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const deleteTags = () => { deletePolicyTags(policyData, selectedTags); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedTags([]); if (isMobileSelectionModeEnabled && selectedTags.length === Object.keys(policyTagLists.at(0)?.tags ?? {}).length) { diff --git a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx index 2efea8db125d..4dcd8e9110aa 100644 --- a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx @@ -257,7 +257,6 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) { }); if (action === ModalActions.CONFIRM) { deletePolicyTags(policyData, selectedTags); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedTags([]); }); diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index e993f1d74399..9026e39f1fe0 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -250,7 +250,6 @@ function WorkspaceTaxesPage({ } deletePolicyTaxes(policy, selectedTaxesIDs, localeCompare); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { setSelectedTaxesIDs([]); }); diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index 40fb435a3dc8..a9e5cdd270bc 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -178,7 +178,6 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) { const {showLockedAccountModal} = useLockedAccountActions(); useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { fetchData(); }); diff --git a/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx b/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx index d43a130d3aa8..af9b430bd53e 100644 --- a/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx +++ b/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx @@ -58,7 +58,6 @@ function WorkspaceWorkflowsApprovalsEditPage({policy, isLoadingReportData = true const membersToRemove = initialApprovalWorkflow.members.filter((initialMember) => !approvalWorkflow.members.some((member) => member.email === initialMember.email)); const approversToRemove = initialApprovalWorkflow.approvers.filter((initialApprover) => !approvalWorkflow.approvers.some((approver) => approver.email === initialApprover.email)); Navigation.dismissModal(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { updateApprovalWorkflow(approvalWorkflow, membersToRemove, approversToRemove, policy); }); @@ -72,7 +71,6 @@ function WorkspaceWorkflowsApprovalsEditPage({policy, isLoadingReportData = true // Mark as deleting to prevent the useEffect from clearing the workflow and causing a blink isDeleting.current = true; Navigation.dismissModal(); - // eslint-disable-next-line @typescript-eslint/no-deprecated InteractionManager.runAfterInteractions(() => { // Remove the approval workflow using the initial data as it could be already edited removeApprovalWorkflow(initialApprovalWorkflow, policy); diff --git a/tests/actions/ReportTest.ts b/tests/actions/ReportTest.ts index ce65cfe72641..b0e5c6060539 100644 --- a/tests/actions/ReportTest.ts +++ b/tests/actions/ReportTest.ts @@ -4098,7 +4098,6 @@ describe('actions/Report', () => { }; const policy = createRandomPolicy(Number(1)); Report.buildOptimisticChangePolicyData(report, undefined, policy, 1, '', false, true, undefined); - // eslint-disable-next-line @typescript-eslint/no-deprecated expect(buildNextStepNew).toHaveBeenCalledWith({ report, policy, diff --git a/tests/perf-test/ReportUtils.perf-test.ts b/tests/perf-test/ReportUtils.perf-test.ts index 88f31c828656..9ae0b597b8b1 100644 --- a/tests/perf-test/ReportUtils.perf-test.ts +++ b/tests/perf-test/ReportUtils.perf-test.ts @@ -155,7 +155,6 @@ describe('ReportUtils', () => { await waitForBatchedUpdates(); // Will be fixed in https://github.com/Expensify/App/issues/76852 - // eslint-disable-next-line @typescript-eslint/no-deprecated await measureFunction(() => getReportName({report, policy})); }); diff --git a/tests/unit/NextStepUtilsTest.ts b/tests/unit/NextStepUtilsTest.ts index 29a3a0a897f6..884c1e5a5979 100644 --- a/tests/unit/NextStepUtilsTest.ts +++ b/tests/unit/NextStepUtilsTest.ts @@ -120,7 +120,6 @@ describe('libs/NextStepUtils', () => { text: ' %expenses.', }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report: emptyReport, policy, @@ -157,7 +156,6 @@ describe('libs/NextStepUtils', () => { text: 'fix the issues', }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -196,7 +194,6 @@ describe('libs/NextStepUtils', () => { text: ' %expenses.', }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -243,7 +240,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -288,7 +284,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -334,7 +329,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -380,7 +374,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -427,7 +420,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -473,7 +465,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -520,7 +511,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -564,7 +554,6 @@ describe('libs/NextStepUtils', () => { }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy: { @@ -612,7 +601,6 @@ describe('libs/NextStepUtils', () => { text: ' %expenses.', }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -657,7 +645,6 @@ describe('libs/NextStepUtils', () => { accountNumber: '123456789', }, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -711,7 +698,6 @@ describe('libs/NextStepUtils', () => { }, }, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -760,7 +746,6 @@ describe('libs/NextStepUtils', () => { }, }, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -789,7 +774,6 @@ describe('libs/NextStepUtils', () => { return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, { approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -833,7 +817,6 @@ describe('libs/NextStepUtils', () => { return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, { approvalMode: CONST.POLICY.APPROVAL_MODE.BASIC, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -877,7 +860,6 @@ describe('libs/NextStepUtils', () => { return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, { approvalMode: CONST.POLICY.APPROVAL_MODE.ADVANCED, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -907,7 +889,6 @@ describe('libs/NextStepUtils', () => { return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, { reimbursementChoice: CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -937,7 +918,6 @@ describe('libs/NextStepUtils', () => { reimbursementChoice: CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL, role: 'user', }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -980,7 +960,6 @@ describe('libs/NextStepUtils', () => { const originalState = {stateNum: report.stateNum, statusNum: report.statusNum}; report.stateNum = CONST.REPORT.STATE_NUM.APPROVED; report.statusNum = CONST.REPORT.STATUS_NUM.APPROVED; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -1029,7 +1008,6 @@ describe('libs/NextStepUtils', () => { accountNumber: '123456789', }, }).then(() => { - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, @@ -1055,7 +1033,6 @@ describe('libs/NextStepUtils', () => { text: 'No further action required!', }, ]; - // eslint-disable-next-line @typescript-eslint/no-deprecated const result = buildNextStepNew({ report, policy, diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 7599fcff2832..102d7d39c0f8 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -1843,7 +1843,6 @@ describe('ReportUtils', () => { }, } as ReportAction; - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = getReportNameDeprecated({report: transactionThread, parentReportActionParam: unreportedTransactionAction}); // Should NOT contain HTML tags @@ -2048,7 +2047,6 @@ describe('ReportUtils', () => { participants: buildParticipantsFromAccountIDs([currentUserAccountID, CONST.ACCOUNT_ID.CONCIERGE]), }; - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = getReportNameDeprecated({ report, policy, @@ -2068,7 +2066,6 @@ describe('ReportUtils', () => { participants: buildParticipantsFromAccountIDs([currentUserAccountID, 1]), }; - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = getReportNameDeprecated({ report, policy, @@ -2090,7 +2087,6 @@ describe('ReportUtils', () => { participants: buildParticipantsFromAccountIDs([currentUserAccountID, CONST.ACCOUNT_ID.CONCIERGE]), }; - // eslint-disable-next-line @typescript-eslint/no-deprecated const reportName = getReportNameDeprecated({report, policy, personalDetails: participantsPersonalDetails}); expect(reportName).toBe(CONST.CONCIERGE_DISPLAY_NAME); }); @@ -14051,7 +14047,6 @@ describe('ReportUtils', () => { await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${conciergeReport.reportID}`, conciergeReport); await Onyx.merge(ONYXKEYS.CONCIERGE_REPORT_ID, conciergeReport.reportID); - // eslint-disable-next-line @typescript-eslint/no-deprecated const name = getReportNameDeprecated({report: conciergeReport, conciergeReportID: conciergeReport.reportID}); expect(name).toBe(CONST.CONCIERGE_DISPLAY_NAME); }); @@ -14063,7 +14058,6 @@ describe('ReportUtils', () => { }; await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${regularReport.reportID}`, regularReport); - // eslint-disable-next-line @typescript-eslint/no-deprecated const name = getReportNameDeprecated({report: regularReport, conciergeReportID: '999'}); expect(name).not.toBe(CONST.CONCIERGE_DISPLAY_NAME); }); diff --git a/tests/unit/canEditFieldOfMoneyRequestTest.ts b/tests/unit/canEditFieldOfMoneyRequestTest.ts index f16dacfea154..18f48b41fc3f 100644 --- a/tests/unit/canEditFieldOfMoneyRequestTest.ts +++ b/tests/unit/canEditFieldOfMoneyRequestTest.ts @@ -68,7 +68,6 @@ describe('canEditFieldOfMoneyRequest', () => { childStateNum: CONST.REPORT.STATE_NUM.OPEN, childStatusNum: CONST.REPORT.STATUS_NUM.OPEN, originalMessage: { - // eslint-disable-next-line @typescript-eslint/no-deprecated ...randomReportAction.originalMessage, IOUReportID, IOUTransactionID, @@ -188,7 +187,6 @@ describe('canEditFieldOfMoneyRequest', () => { childStateNum: CONST.REPORT.STATE_NUM.SUBMITTED, childStatusNum: CONST.REPORT.STATUS_NUM.SUBMITTED, originalMessage: { - // eslint-disable-next-line @typescript-eslint/no-deprecated ...randomReportAction.originalMessage, IOUReportID, IOUTransactionID, @@ -639,7 +637,6 @@ describe('canEditFieldOfMoneyRequest', () => { childStateNum: CONST.REPORT.STATE_NUM.OPEN, childStatusNum: CONST.REPORT.STATUS_NUM.OPEN, originalMessage: { - // eslint-disable-next-line @typescript-eslint/no-deprecated ...randomReportAction.originalMessage, IOUReportID: RECEIPT_IOU_REPORT_ID, IOUTransactionID: RECEIPT_IOU_TRANSACTION_ID,