From 439c52b7d4d547ea0b64d4fa09f318d706c8f232 Mon Sep 17 00:00:00 2001 From: paulnjs Date: Wed, 31 Dec 2025 14:31:20 +0700 Subject: [PATCH 1/2] fix: Two emojis have different size --- .claude/scripts/checkReactCompilerOptimization.ts | 1 + .storybook/webpack.config.ts | 2 ++ __mocks__/react-native-onyx.ts | 1 + desktop/electron-serve.ts | 3 +++ scripts/checkLazyLoading.ts | 1 + scripts/generateTranslations.ts | 1 + scripts/react-compiler-compliance-check.ts | 2 ++ scripts/release-profile.ts | 1 + scripts/symbolicate-profile.ts | 2 ++ src/components/ReportActionItem/MoneyRequestView.tsx | 3 +-- src/components/SidePanel/HelpContent/helpContentMap.tsx | 2 ++ src/libs/DebugUtils.ts | 1 + src/libs/E2E/actions/e2eLogin.ts | 1 + src/libs/Log.ts | 1 + src/libs/Navigation/helpers/createNormalizedConfigs.ts | 8 ++++++++ src/libs/SidebarUtils.ts | 3 +-- .../report/ContextMenu/PopoverReportActionContextMenu.tsx | 1 + src/pages/home/report/comment/TextCommentFragment.tsx | 4 ++-- src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx | 3 +-- src/styles/index.ts | 1 + tests/actions/EnforceActionExportRestrictions.ts | 1 + tests/actions/IOUTest.ts | 1 + tests/actions/TaskTest.ts | 1 + tests/e2e/testRunner.ts | 1 + tests/perf-test/ReportUtils.perf-test.ts | 3 +-- tests/ui/GroupChatNameTests.tsx | 2 ++ tests/unit/CIGitLogicTest.ts | 1 + tests/unit/GithubUtilsTest.ts | 1 + tests/unit/Search/buildCardFilterDataTest.ts | 1 + tests/unit/awaitStagingDeploysTest.ts | 1 + tests/unit/markPullRequestsAsDeployedTest.ts | 1 + tests/utils/debug.ts | 1 + 32 files changed, 47 insertions(+), 10 deletions(-) diff --git a/.claude/scripts/checkReactCompilerOptimization.ts b/.claude/scripts/checkReactCompilerOptimization.ts index 57d6479179d5..d18666585b2e 100755 --- a/.claude/scripts/checkReactCompilerOptimization.ts +++ b/.claude/scripts/checkReactCompilerOptimization.ts @@ -1,4 +1,5 @@ #!/usr/bin/env -S npx ts-node + /** * Check React Compiler optimization status for a file and its imported components. * diff --git a/.storybook/webpack.config.ts b/.storybook/webpack.config.ts index ffe6fe201d24..e0867187dc67 100644 --- a/.storybook/webpack.config.ts +++ b/.storybook/webpack.config.ts @@ -1,5 +1,7 @@ /* eslint-disable no-underscore-dangle */ + /* eslint-disable no-param-reassign */ + /* eslint-disable @typescript-eslint/naming-convention */ import dotenv from 'dotenv'; import {createRequire} from 'module'; diff --git a/__mocks__/react-native-onyx.ts b/__mocks__/react-native-onyx.ts index 23894e119b27..3c84f8dfa951 100644 --- a/__mocks__/react-native-onyx.ts +++ b/__mocks__/react-native-onyx.ts @@ -2,6 +2,7 @@ * We are disabling the lint rule that doesn't allow the usage of Onyx.connect outside libs * because the intent of this file is to mock the usage of react-native-onyx so we will have to mock the connect function */ + /* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ import type {ConnectOptions, OnyxKey} from 'react-native-onyx'; // eslint-disable-next-line no-restricted-imports diff --git a/desktop/electron-serve.ts b/desktop/electron-serve.ts index 088efb09d3a1..9914074c8288 100644 --- a/desktop/electron-serve.ts +++ b/desktop/electron-serve.ts @@ -1,6 +1,9 @@ /* eslint-disable @typescript-eslint/naming-convention */ + /* eslint-disable @typescript-eslint/no-misused-promises */ + /* eslint-disable rulesdir/no-negated-variables */ + /** * This file is a modified version of the electron-serve package. * We keep the same interface, but instead of file protocol we use buffer protocol (with support of JS self profiling). diff --git a/scripts/checkLazyLoading.ts b/scripts/checkLazyLoading.ts index 16e0138469fa..7c8427e6dcd4 100644 --- a/scripts/checkLazyLoading.ts +++ b/scripts/checkLazyLoading.ts @@ -1,4 +1,5 @@ #!/usr/bin/env ts-node + /** * Script to check if icons and illustrations are using lazy loading * This script scans the codebase for direct imports from deprecated eager loading files diff --git a/scripts/generateTranslations.ts b/scripts/generateTranslations.ts index 39214854aaaa..231f23455c74 100755 --- a/scripts/generateTranslations.ts +++ b/scripts/generateTranslations.ts @@ -1,4 +1,5 @@ #!/usr/bin/env npx ts-node + /* * This script uses src/languages/en.ts as the source of truth, and leverages ChatGPT to generate translations for other languages. */ diff --git a/scripts/react-compiler-compliance-check.ts b/scripts/react-compiler-compliance-check.ts index 6d73d23ac923..ec594b109c24 100644 --- a/scripts/react-compiler-compliance-check.ts +++ b/scripts/react-compiler-compliance-check.ts @@ -1,5 +1,7 @@ #!/usr/bin/env ts-node + /* eslint-disable max-classes-per-file */ + /** * React Compiler Compliance Checker * diff --git a/scripts/release-profile.ts b/scripts/release-profile.ts index 9697ead8a1d6..615f009d743d 100755 --- a/scripts/release-profile.ts +++ b/scripts/release-profile.ts @@ -1,4 +1,5 @@ #!/usr/bin/env ts-node + /* eslint-disable no-console */ import {execSync} from 'child_process'; import fs from 'fs'; diff --git a/scripts/symbolicate-profile.ts b/scripts/symbolicate-profile.ts index 9215550e5a3f..a58c2894edb6 100755 --- a/scripts/symbolicate-profile.ts +++ b/scripts/symbolicate-profile.ts @@ -1,5 +1,7 @@ #!/usr/bin/env ts-node + /* eslint-disable @typescript-eslint/naming-convention */ + /** * This script helps to symbolicate a .cpuprofile file that was obtained from a specific (staging) app version (usually provided by a user using the app). * diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 2c152e26e04b..6609add0e41c 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -55,8 +55,7 @@ import {isSplitAction} from '@libs/ReportSecondaryActionUtils'; import { canEditFieldOfMoneyRequest, canEditMoneyRequest, - canUserPerformWriteAction as canUserPerformWriteActionReportUtils, - // eslint-disable-next-line @typescript-eslint/no-deprecated + canUserPerformWriteAction as canUserPerformWriteActionReportUtils, // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getTransactionDetails, getTripIDFromTransactionParentReportID, diff --git a/src/components/SidePanel/HelpContent/helpContentMap.tsx b/src/components/SidePanel/HelpContent/helpContentMap.tsx index 1128272fe339..6f9c180c418d 100644 --- a/src/components/SidePanel/HelpContent/helpContentMap.tsx +++ b/src/components/SidePanel/HelpContent/helpContentMap.tsx @@ -1,5 +1,7 @@ /* eslint-disable react/jsx-key */ + /* eslint-disable react/no-unescaped-entities */ + /* eslint-disable @typescript-eslint/naming-convention */ import type {ReactNode} from 'react'; import React from 'react'; diff --git a/src/libs/DebugUtils.ts b/src/libs/DebugUtils.ts index 128a9613e254..8be32c9469ec 100644 --- a/src/libs/DebugUtils.ts +++ b/src/libs/DebugUtils.ts @@ -1,4 +1,5 @@ /* eslint-disable default-case */ + /* eslint-disable max-classes-per-file */ import {isMatch, isValid} from 'date-fns'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; diff --git a/src/libs/E2E/actions/e2eLogin.ts b/src/libs/E2E/actions/e2eLogin.ts index a1a266fd156d..a57aa9cb261f 100644 --- a/src/libs/E2E/actions/e2eLogin.ts +++ b/src/libs/E2E/actions/e2eLogin.ts @@ -1,4 +1,5 @@ /* eslint-disable rulesdir/prefer-actions-set-data */ + /* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ import Onyx from 'react-native-onyx'; import {Authenticate} from '@libs/Authentication'; diff --git a/src/libs/Log.ts b/src/libs/Log.ts index 41d35841eecb..57fc67a41f51 100644 --- a/src/libs/Log.ts +++ b/src/libs/Log.ts @@ -1,5 +1,6 @@ // Making an exception to this rule here since we don't need an "action" for Log and Log should just be used directly. Creating a Log // action would likely cause confusion about which one to use. But most other API methods should happen inside an action file. + /* eslint-disable rulesdir/no-api-in-views */ import HybridAppModule from '@expensify/react-native-hybrid-app'; import {Logger} from 'expensify-common'; diff --git a/src/libs/Navigation/helpers/createNormalizedConfigs.ts b/src/libs/Navigation/helpers/createNormalizedConfigs.ts index ecf996fbda1a..b6ae85a4c778 100644 --- a/src/libs/Navigation/helpers/createNormalizedConfigs.ts +++ b/src/libs/Navigation/helpers/createNormalizedConfigs.ts @@ -1,11 +1,19 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ + /* eslint-disable @typescript-eslint/default-param-last */ + /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ + /* eslint-disable no-param-reassign */ + /* eslint-disable @typescript-eslint/no-unsafe-argument */ + /* eslint-disable @typescript-eslint/no-non-null-assertion */ + /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + /* eslint-disable @typescript-eslint/no-restricted-types */ // THOSE FUNCTIONS ARE COPIED FROM react-navigation/core IN ORDER TO AVOID PATCHING // THAT'S THE REASON WHY ESLINT IS DISABLED diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index ead6cb601e8e..6336daf15a68 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -105,8 +105,7 @@ import { getPolicyName, getReportActionActorAccountID, getReportDescription, - getReportMetadata, - // eslint-disable-next-line @typescript-eslint/no-deprecated + getReportMetadata, // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getReportNotificationPreference, getReportParticipantsTitle, diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx index 968a684d3aed..7348a9717e4c 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -1,6 +1,7 @@ /* eslint-disable react-compiler/react-compiler */ import type {ForwardedRef} from 'react'; import React, {useCallback, useContext, useEffect, useImperativeHandle, useRef, useState} from 'react'; + /* eslint-disable no-restricted-imports */ import type {EmitterSubscription, GestureResponderEvent, NativeTouchEvent, View} from 'react-native'; import {DeviceEventEmitter, Dimensions, InteractionManager} from 'react-native'; diff --git a/src/pages/home/report/comment/TextCommentFragment.tsx b/src/pages/home/report/comment/TextCommentFragment.tsx index 37d672977772..f13bf68dc3c4 100644 --- a/src/pages/home/report/comment/TextCommentFragment.tsx +++ b/src/pages/home/report/comment/TextCommentFragment.tsx @@ -93,9 +93,9 @@ function TextCommentFragment({fragment, styleAsDeleted, reportActionID, styleAsM const lines = htmlContent.split(//i); const processedLines = lines.map((line) => { if (isEmojiOnSeparateLine(line)) { - return line.replace('', ''); + return line.replaceAll('', ''); } - return line.replace('', ''); + return line.replaceAll('', ''); }); htmlContent = processedLines.join('
'); diff --git a/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx b/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx index 54af4a3c1ed2..220b2f12c134 100644 --- a/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx +++ b/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx @@ -52,8 +52,7 @@ import {getQuickActionIcon, getQuickActionTitle, isQuickActionAllowed} from '@li import { generateReportID, getDisplayNameForParticipant, - getIcons, - // Will be fixed in https://github.com/Expensify/App/issues/76852 + getIcons, // Will be fixed in https://github.com/Expensify/App/issues/76852 // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getWorkspaceChats, diff --git a/src/styles/index.ts b/src/styles/index.ts index efc5a3d8ac20..85b69b22fe60 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -1,4 +1,5 @@ /* eslint-disable max-lines */ + /* eslint-disable @typescript-eslint/naming-convention */ import type {LineLayerStyleProps} from '@rnmapbox/maps/src/utils/MapboxStyles'; import lodashClamp from 'lodash/clamp'; diff --git a/tests/actions/EnforceActionExportRestrictions.ts b/tests/actions/EnforceActionExportRestrictions.ts index 8720f641149e..b63c6dbeed4f 100644 --- a/tests/actions/EnforceActionExportRestrictions.ts +++ b/tests/actions/EnforceActionExportRestrictions.ts @@ -1,4 +1,5 @@ // this file is for testing which methods should not be exported so it is not possible to use named imports - that's why we need to disable the no-restricted-syntax rule + /* eslint-disable no-restricted-syntax */ import * as IOU from '@libs/actions/IOU'; import * as OptionsListUtils from '@libs/OptionsListUtils'; diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index 1ead6c2f45fc..de92b4b9ffbe 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {renderHook, waitFor} from '@testing-library/react-native'; import {format} from 'date-fns'; diff --git a/tests/actions/TaskTest.ts b/tests/actions/TaskTest.ts index 2a3a27c05e82..59c8ee876a59 100644 --- a/tests/actions/TaskTest.ts +++ b/tests/actions/TaskTest.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {act, renderHook} from '@testing-library/react-native'; import Onyx from 'react-native-onyx'; diff --git a/tests/e2e/testRunner.ts b/tests/e2e/testRunner.ts index 3cb52a6589ea..6c2401b1ef86 100644 --- a/tests/e2e/testRunner.ts +++ b/tests/e2e/testRunner.ts @@ -12,6 +12,7 @@ * This two runs will generate a main.json and a delta.json with the performance data, which then you can merge via * node tests/e2e/merge.js */ + /* eslint-disable no-restricted-syntax,no-await-in-loop */ import {execSync} from 'child_process'; import fs from 'fs'; diff --git a/tests/perf-test/ReportUtils.perf-test.ts b/tests/perf-test/ReportUtils.perf-test.ts index 574d1867adec..b2725d945750 100644 --- a/tests/perf-test/ReportUtils.perf-test.ts +++ b/tests/perf-test/ReportUtils.perf-test.ts @@ -9,8 +9,7 @@ import { getDisplayNamesWithTooltips, getIcons, getIconsForParticipants, - getIOUReportActionDisplayMessage, - // Will be fixed in https://github.com/Expensify/App/issues/76852 + getIOUReportActionDisplayMessage, // Will be fixed in https://github.com/Expensify/App/issues/76852 // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getReportPreviewMessage, diff --git a/tests/ui/GroupChatNameTests.tsx b/tests/ui/GroupChatNameTests.tsx index 94eb0491fbdf..667433065aa5 100644 --- a/tests/ui/GroupChatNameTests.tsx +++ b/tests/ui/GroupChatNameTests.tsx @@ -1,5 +1,7 @@ /* eslint-disable testing-library/no-node-access */ + /* eslint-disable @typescript-eslint/no-unsafe-assignment */ + /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import {act, render, screen, waitFor} from '@testing-library/react-native'; import React from 'react'; diff --git a/tests/unit/CIGitLogicTest.ts b/tests/unit/CIGitLogicTest.ts index 62be33e846dc..62b74c938699 100644 --- a/tests/unit/CIGitLogicTest.ts +++ b/tests/unit/CIGitLogicTest.ts @@ -2,6 +2,7 @@ * @jest-environment node * @jest-config bail=true */ + /* eslint-disable no-console */ import * as core from '@actions/core'; import {execSync} from 'child_process'; diff --git a/tests/unit/GithubUtilsTest.ts b/tests/unit/GithubUtilsTest.ts index 6650e826d31f..f0f40549484e 100644 --- a/tests/unit/GithubUtilsTest.ts +++ b/tests/unit/GithubUtilsTest.ts @@ -1,6 +1,7 @@ /** * @jest-environment node */ + /* eslint-disable @typescript-eslint/naming-convention */ import * as core from '@actions/core'; import {RequestError} from '@octokit/request-error'; diff --git a/tests/unit/Search/buildCardFilterDataTest.ts b/tests/unit/Search/buildCardFilterDataTest.ts index 1a5ec5ff89c8..1548e24dfe4a 100644 --- a/tests/unit/Search/buildCardFilterDataTest.ts +++ b/tests/unit/Search/buildCardFilterDataTest.ts @@ -1,4 +1,5 @@ // The cards_ object keys don't follow normal naming convention, so to test this reliably we have to disable liner + /* eslint-disable @typescript-eslint/naming-convention */ import type {LocaleContextProps} from '@components/LocaleContextProvider'; import {buildCardFeedsData, buildCardsData} from '@libs/CardFeedUtils'; diff --git a/tests/unit/awaitStagingDeploysTest.ts b/tests/unit/awaitStagingDeploysTest.ts index e61115a3a02f..dc049ef3ae36 100644 --- a/tests/unit/awaitStagingDeploysTest.ts +++ b/tests/unit/awaitStagingDeploysTest.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ + /** * @jest-environment node */ diff --git a/tests/unit/markPullRequestsAsDeployedTest.ts b/tests/unit/markPullRequestsAsDeployedTest.ts index d5242033c628..fb29e697f1e3 100644 --- a/tests/unit/markPullRequestsAsDeployedTest.ts +++ b/tests/unit/markPullRequestsAsDeployedTest.ts @@ -1,6 +1,7 @@ /** * @jest-environment node */ + /* eslint-disable @typescript-eslint/naming-convention */ import CONST from '../../.github/libs/CONST'; import type {InternalOctokit} from '../../.github/libs/GithubUtils'; diff --git a/tests/utils/debug.ts b/tests/utils/debug.ts index 35f1ad1ef893..24484448900a 100644 --- a/tests/utils/debug.ts +++ b/tests/utils/debug.ts @@ -3,6 +3,7 @@ * has limited functionality. This is a better version of it that allows logging a subtree of * the app. */ + /* eslint-disable no-console, testing-library/no-node-access, testing-library/no-debugging-utils, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/prefer-nullish-coalescing */ import type {NewPlugin} from 'pretty-format'; import prettyFormat, {plugins} from 'pretty-format'; From a6baec14c4264fcd7b735e19d7a525cb59c5f0a7 Mon Sep 17 00:00:00 2001 From: paulnjs Date: Wed, 31 Dec 2025 14:43:06 +0700 Subject: [PATCH 2/2] update code --- .claude/scripts/checkReactCompilerOptimization.ts | 1 - .storybook/webpack.config.ts | 2 -- __mocks__/react-native-onyx.ts | 1 - desktop/electron-serve.ts | 3 --- scripts/checkLazyLoading.ts | 1 - scripts/generateTranslations.ts | 1 - scripts/react-compiler-compliance-check.ts | 2 -- scripts/release-profile.ts | 1 - scripts/symbolicate-profile.ts | 2 -- src/components/ReportActionItem/MoneyRequestView.tsx | 3 ++- src/components/SidePanel/HelpContent/helpContentMap.tsx | 2 -- src/libs/DebugUtils.ts | 1 - src/libs/E2E/actions/e2eLogin.ts | 1 - src/libs/Log.ts | 1 - src/libs/Navigation/helpers/createNormalizedConfigs.ts | 8 -------- src/libs/SidebarUtils.ts | 3 ++- .../report/ContextMenu/PopoverReportActionContextMenu.tsx | 1 - src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx | 3 ++- src/styles/index.ts | 1 - tests/actions/EnforceActionExportRestrictions.ts | 1 - tests/actions/IOUTest.ts | 1 - tests/actions/TaskTest.ts | 1 - tests/e2e/testRunner.ts | 1 - tests/perf-test/ReportUtils.perf-test.ts | 3 ++- tests/ui/GroupChatNameTests.tsx | 2 -- tests/unit/CIGitLogicTest.ts | 1 - tests/unit/GithubUtilsTest.ts | 1 - tests/unit/Search/buildCardFilterDataTest.ts | 1 - tests/unit/awaitStagingDeploysTest.ts | 1 - tests/unit/markPullRequestsAsDeployedTest.ts | 1 - tests/utils/debug.ts | 1 - 31 files changed, 8 insertions(+), 45 deletions(-) diff --git a/.claude/scripts/checkReactCompilerOptimization.ts b/.claude/scripts/checkReactCompilerOptimization.ts index d18666585b2e..57d6479179d5 100755 --- a/.claude/scripts/checkReactCompilerOptimization.ts +++ b/.claude/scripts/checkReactCompilerOptimization.ts @@ -1,5 +1,4 @@ #!/usr/bin/env -S npx ts-node - /** * Check React Compiler optimization status for a file and its imported components. * diff --git a/.storybook/webpack.config.ts b/.storybook/webpack.config.ts index e0867187dc67..ffe6fe201d24 100644 --- a/.storybook/webpack.config.ts +++ b/.storybook/webpack.config.ts @@ -1,7 +1,5 @@ /* eslint-disable no-underscore-dangle */ - /* eslint-disable no-param-reassign */ - /* eslint-disable @typescript-eslint/naming-convention */ import dotenv from 'dotenv'; import {createRequire} from 'module'; diff --git a/__mocks__/react-native-onyx.ts b/__mocks__/react-native-onyx.ts index 3c84f8dfa951..23894e119b27 100644 --- a/__mocks__/react-native-onyx.ts +++ b/__mocks__/react-native-onyx.ts @@ -2,7 +2,6 @@ * We are disabling the lint rule that doesn't allow the usage of Onyx.connect outside libs * because the intent of this file is to mock the usage of react-native-onyx so we will have to mock the connect function */ - /* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ import type {ConnectOptions, OnyxKey} from 'react-native-onyx'; // eslint-disable-next-line no-restricted-imports diff --git a/desktop/electron-serve.ts b/desktop/electron-serve.ts index 9914074c8288..088efb09d3a1 100644 --- a/desktop/electron-serve.ts +++ b/desktop/electron-serve.ts @@ -1,9 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ - /* eslint-disable @typescript-eslint/no-misused-promises */ - /* eslint-disable rulesdir/no-negated-variables */ - /** * This file is a modified version of the electron-serve package. * We keep the same interface, but instead of file protocol we use buffer protocol (with support of JS self profiling). diff --git a/scripts/checkLazyLoading.ts b/scripts/checkLazyLoading.ts index 7c8427e6dcd4..16e0138469fa 100644 --- a/scripts/checkLazyLoading.ts +++ b/scripts/checkLazyLoading.ts @@ -1,5 +1,4 @@ #!/usr/bin/env ts-node - /** * Script to check if icons and illustrations are using lazy loading * This script scans the codebase for direct imports from deprecated eager loading files diff --git a/scripts/generateTranslations.ts b/scripts/generateTranslations.ts index 231f23455c74..39214854aaaa 100755 --- a/scripts/generateTranslations.ts +++ b/scripts/generateTranslations.ts @@ -1,5 +1,4 @@ #!/usr/bin/env npx ts-node - /* * This script uses src/languages/en.ts as the source of truth, and leverages ChatGPT to generate translations for other languages. */ diff --git a/scripts/react-compiler-compliance-check.ts b/scripts/react-compiler-compliance-check.ts index ec594b109c24..6d73d23ac923 100644 --- a/scripts/react-compiler-compliance-check.ts +++ b/scripts/react-compiler-compliance-check.ts @@ -1,7 +1,5 @@ #!/usr/bin/env ts-node - /* eslint-disable max-classes-per-file */ - /** * React Compiler Compliance Checker * diff --git a/scripts/release-profile.ts b/scripts/release-profile.ts index 615f009d743d..9697ead8a1d6 100755 --- a/scripts/release-profile.ts +++ b/scripts/release-profile.ts @@ -1,5 +1,4 @@ #!/usr/bin/env ts-node - /* eslint-disable no-console */ import {execSync} from 'child_process'; import fs from 'fs'; diff --git a/scripts/symbolicate-profile.ts b/scripts/symbolicate-profile.ts index a58c2894edb6..9215550e5a3f 100755 --- a/scripts/symbolicate-profile.ts +++ b/scripts/symbolicate-profile.ts @@ -1,7 +1,5 @@ #!/usr/bin/env ts-node - /* eslint-disable @typescript-eslint/naming-convention */ - /** * This script helps to symbolicate a .cpuprofile file that was obtained from a specific (staging) app version (usually provided by a user using the app). * diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 6609add0e41c..2c152e26e04b 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -55,7 +55,8 @@ import {isSplitAction} from '@libs/ReportSecondaryActionUtils'; import { canEditFieldOfMoneyRequest, canEditMoneyRequest, - canUserPerformWriteAction as canUserPerformWriteActionReportUtils, // eslint-disable-next-line @typescript-eslint/no-deprecated + canUserPerformWriteAction as canUserPerformWriteActionReportUtils, + // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getTransactionDetails, getTripIDFromTransactionParentReportID, diff --git a/src/components/SidePanel/HelpContent/helpContentMap.tsx b/src/components/SidePanel/HelpContent/helpContentMap.tsx index 6f9c180c418d..1128272fe339 100644 --- a/src/components/SidePanel/HelpContent/helpContentMap.tsx +++ b/src/components/SidePanel/HelpContent/helpContentMap.tsx @@ -1,7 +1,5 @@ /* eslint-disable react/jsx-key */ - /* eslint-disable react/no-unescaped-entities */ - /* eslint-disable @typescript-eslint/naming-convention */ import type {ReactNode} from 'react'; import React from 'react'; diff --git a/src/libs/DebugUtils.ts b/src/libs/DebugUtils.ts index 8be32c9469ec..128a9613e254 100644 --- a/src/libs/DebugUtils.ts +++ b/src/libs/DebugUtils.ts @@ -1,5 +1,4 @@ /* eslint-disable default-case */ - /* eslint-disable max-classes-per-file */ import {isMatch, isValid} from 'date-fns'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; diff --git a/src/libs/E2E/actions/e2eLogin.ts b/src/libs/E2E/actions/e2eLogin.ts index a57aa9cb261f..a1a266fd156d 100644 --- a/src/libs/E2E/actions/e2eLogin.ts +++ b/src/libs/E2E/actions/e2eLogin.ts @@ -1,5 +1,4 @@ /* eslint-disable rulesdir/prefer-actions-set-data */ - /* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ import Onyx from 'react-native-onyx'; import {Authenticate} from '@libs/Authentication'; diff --git a/src/libs/Log.ts b/src/libs/Log.ts index 57fc67a41f51..41d35841eecb 100644 --- a/src/libs/Log.ts +++ b/src/libs/Log.ts @@ -1,6 +1,5 @@ // Making an exception to this rule here since we don't need an "action" for Log and Log should just be used directly. Creating a Log // action would likely cause confusion about which one to use. But most other API methods should happen inside an action file. - /* eslint-disable rulesdir/no-api-in-views */ import HybridAppModule from '@expensify/react-native-hybrid-app'; import {Logger} from 'expensify-common'; diff --git a/src/libs/Navigation/helpers/createNormalizedConfigs.ts b/src/libs/Navigation/helpers/createNormalizedConfigs.ts index b6ae85a4c778..ecf996fbda1a 100644 --- a/src/libs/Navigation/helpers/createNormalizedConfigs.ts +++ b/src/libs/Navigation/helpers/createNormalizedConfigs.ts @@ -1,19 +1,11 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ - /* eslint-disable @typescript-eslint/default-param-last */ - /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ - /* eslint-disable no-param-reassign */ - /* eslint-disable @typescript-eslint/no-unsafe-argument */ - /* eslint-disable @typescript-eslint/no-non-null-assertion */ - /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - /* eslint-disable @typescript-eslint/no-restricted-types */ // THOSE FUNCTIONS ARE COPIED FROM react-navigation/core IN ORDER TO AVOID PATCHING // THAT'S THE REASON WHY ESLINT IS DISABLED diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 6336daf15a68..ead6cb601e8e 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -105,7 +105,8 @@ import { getPolicyName, getReportActionActorAccountID, getReportDescription, - getReportMetadata, // eslint-disable-next-line @typescript-eslint/no-deprecated + getReportMetadata, + // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getReportNotificationPreference, getReportParticipantsTitle, diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx index 7348a9717e4c..968a684d3aed 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -1,7 +1,6 @@ /* eslint-disable react-compiler/react-compiler */ import type {ForwardedRef} from 'react'; import React, {useCallback, useContext, useEffect, useImperativeHandle, useRef, useState} from 'react'; - /* eslint-disable no-restricted-imports */ import type {EmitterSubscription, GestureResponderEvent, NativeTouchEvent, View} from 'react-native'; import {DeviceEventEmitter, Dimensions, InteractionManager} from 'react-native'; diff --git a/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx b/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx index 220b2f12c134..54af4a3c1ed2 100644 --- a/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx +++ b/src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx @@ -52,7 +52,8 @@ import {getQuickActionIcon, getQuickActionTitle, isQuickActionAllowed} from '@li import { generateReportID, getDisplayNameForParticipant, - getIcons, // Will be fixed in https://github.com/Expensify/App/issues/76852 + getIcons, + // Will be fixed in https://github.com/Expensify/App/issues/76852 // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getWorkspaceChats, diff --git a/src/styles/index.ts b/src/styles/index.ts index 85b69b22fe60..efc5a3d8ac20 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -1,5 +1,4 @@ /* eslint-disable max-lines */ - /* eslint-disable @typescript-eslint/naming-convention */ import type {LineLayerStyleProps} from '@rnmapbox/maps/src/utils/MapboxStyles'; import lodashClamp from 'lodash/clamp'; diff --git a/tests/actions/EnforceActionExportRestrictions.ts b/tests/actions/EnforceActionExportRestrictions.ts index b63c6dbeed4f..8720f641149e 100644 --- a/tests/actions/EnforceActionExportRestrictions.ts +++ b/tests/actions/EnforceActionExportRestrictions.ts @@ -1,5 +1,4 @@ // this file is for testing which methods should not be exported so it is not possible to use named imports - that's why we need to disable the no-restricted-syntax rule - /* eslint-disable no-restricted-syntax */ import * as IOU from '@libs/actions/IOU'; import * as OptionsListUtils from '@libs/OptionsListUtils'; diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index de92b4b9ffbe..1ead6c2f45fc 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {renderHook, waitFor} from '@testing-library/react-native'; import {format} from 'date-fns'; diff --git a/tests/actions/TaskTest.ts b/tests/actions/TaskTest.ts index 59c8ee876a59..2a3a27c05e82 100644 --- a/tests/actions/TaskTest.ts +++ b/tests/actions/TaskTest.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {act, renderHook} from '@testing-library/react-native'; import Onyx from 'react-native-onyx'; diff --git a/tests/e2e/testRunner.ts b/tests/e2e/testRunner.ts index 6c2401b1ef86..3cb52a6589ea 100644 --- a/tests/e2e/testRunner.ts +++ b/tests/e2e/testRunner.ts @@ -12,7 +12,6 @@ * This two runs will generate a main.json and a delta.json with the performance data, which then you can merge via * node tests/e2e/merge.js */ - /* eslint-disable no-restricted-syntax,no-await-in-loop */ import {execSync} from 'child_process'; import fs from 'fs'; diff --git a/tests/perf-test/ReportUtils.perf-test.ts b/tests/perf-test/ReportUtils.perf-test.ts index b2725d945750..574d1867adec 100644 --- a/tests/perf-test/ReportUtils.perf-test.ts +++ b/tests/perf-test/ReportUtils.perf-test.ts @@ -9,7 +9,8 @@ import { getDisplayNamesWithTooltips, getIcons, getIconsForParticipants, - getIOUReportActionDisplayMessage, // Will be fixed in https://github.com/Expensify/App/issues/76852 + getIOUReportActionDisplayMessage, + // Will be fixed in https://github.com/Expensify/App/issues/76852 // eslint-disable-next-line @typescript-eslint/no-deprecated getReportName, getReportPreviewMessage, diff --git a/tests/ui/GroupChatNameTests.tsx b/tests/ui/GroupChatNameTests.tsx index 667433065aa5..94eb0491fbdf 100644 --- a/tests/ui/GroupChatNameTests.tsx +++ b/tests/ui/GroupChatNameTests.tsx @@ -1,7 +1,5 @@ /* eslint-disable testing-library/no-node-access */ - /* eslint-disable @typescript-eslint/no-unsafe-assignment */ - /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import {act, render, screen, waitFor} from '@testing-library/react-native'; import React from 'react'; diff --git a/tests/unit/CIGitLogicTest.ts b/tests/unit/CIGitLogicTest.ts index 62b74c938699..62be33e846dc 100644 --- a/tests/unit/CIGitLogicTest.ts +++ b/tests/unit/CIGitLogicTest.ts @@ -2,7 +2,6 @@ * @jest-environment node * @jest-config bail=true */ - /* eslint-disable no-console */ import * as core from '@actions/core'; import {execSync} from 'child_process'; diff --git a/tests/unit/GithubUtilsTest.ts b/tests/unit/GithubUtilsTest.ts index f0f40549484e..6650e826d31f 100644 --- a/tests/unit/GithubUtilsTest.ts +++ b/tests/unit/GithubUtilsTest.ts @@ -1,7 +1,6 @@ /** * @jest-environment node */ - /* eslint-disable @typescript-eslint/naming-convention */ import * as core from '@actions/core'; import {RequestError} from '@octokit/request-error'; diff --git a/tests/unit/Search/buildCardFilterDataTest.ts b/tests/unit/Search/buildCardFilterDataTest.ts index 1548e24dfe4a..1a5ec5ff89c8 100644 --- a/tests/unit/Search/buildCardFilterDataTest.ts +++ b/tests/unit/Search/buildCardFilterDataTest.ts @@ -1,5 +1,4 @@ // The cards_ object keys don't follow normal naming convention, so to test this reliably we have to disable liner - /* eslint-disable @typescript-eslint/naming-convention */ import type {LocaleContextProps} from '@components/LocaleContextProvider'; import {buildCardFeedsData, buildCardsData} from '@libs/CardFeedUtils'; diff --git a/tests/unit/awaitStagingDeploysTest.ts b/tests/unit/awaitStagingDeploysTest.ts index dc049ef3ae36..e61115a3a02f 100644 --- a/tests/unit/awaitStagingDeploysTest.ts +++ b/tests/unit/awaitStagingDeploysTest.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/naming-convention */ - /** * @jest-environment node */ diff --git a/tests/unit/markPullRequestsAsDeployedTest.ts b/tests/unit/markPullRequestsAsDeployedTest.ts index fb29e697f1e3..d5242033c628 100644 --- a/tests/unit/markPullRequestsAsDeployedTest.ts +++ b/tests/unit/markPullRequestsAsDeployedTest.ts @@ -1,7 +1,6 @@ /** * @jest-environment node */ - /* eslint-disable @typescript-eslint/naming-convention */ import CONST from '../../.github/libs/CONST'; import type {InternalOctokit} from '../../.github/libs/GithubUtils'; diff --git a/tests/utils/debug.ts b/tests/utils/debug.ts index 24484448900a..35f1ad1ef893 100644 --- a/tests/utils/debug.ts +++ b/tests/utils/debug.ts @@ -3,7 +3,6 @@ * has limited functionality. This is a better version of it that allows logging a subtree of * the app. */ - /* eslint-disable no-console, testing-library/no-node-access, testing-library/no-debugging-utils, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/prefer-nullish-coalescing */ import type {NewPlugin} from 'pretty-format'; import prettyFormat, {plugins} from 'pretty-format';