diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index 4dd1a907257d2..8703e99a38839 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -15875,6 +15875,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 8c07232d29dee..67dd505705f0a 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12679,6 +12679,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/checkAndroidStatus/index.js b/.github/actions/javascript/checkAndroidStatus/index.js index 2f347064b8bc3..d926380a03063 100644 --- a/.github/actions/javascript/checkAndroidStatus/index.js +++ b/.github/actions/javascript/checkAndroidStatus/index.js @@ -737422,6 +737422,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 33e12d3a2bb5b..bde652bb65b8e 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -11946,6 +11946,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/checkSVGCompression/index.js b/.github/actions/javascript/checkSVGCompression/index.js index 1a8494265e3b1..bd1bcbeda95ef 100644 --- a/.github/actions/javascript/checkSVGCompression/index.js +++ b/.github/actions/javascript/checkSVGCompression/index.js @@ -20471,6 +20471,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 98f1ecea463d7..3b3a72b093f21 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -12233,6 +12233,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/getArtifactInfo/index.js b/.github/actions/javascript/getArtifactInfo/index.js index 9774ff3669267..410e81c8e543d 100644 --- a/.github/actions/javascript/getArtifactInfo/index.js +++ b/.github/actions/javascript/getArtifactInfo/index.js @@ -11907,6 +11907,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index ea09737a39638..7f8090725d3c9 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -12252,6 +12252,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/getPreviousVersion/index.js b/.github/actions/javascript/getPreviousVersion/index.js index 3d7d341a8ddbf..ad5e2462e86d6 100644 --- a/.github/actions/javascript/getPreviousVersion/index.js +++ b/.github/actions/javascript/getPreviousVersion/index.js @@ -12063,6 +12063,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index b495c41be6b9d..3fb0799f7f941 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -12036,6 +12036,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js index 281f9e64a9fec..86b18f8a1f546 100644 --- a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js +++ b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js @@ -12138,6 +12138,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index c30d651dba42a..58cea7e0027da 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -11907,6 +11907,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index b019da7e5e796..e1f5bdb9afa10 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -13360,6 +13360,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js index 75ad6573dd5cd..5062a8823db52 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -12037,6 +12037,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/proposalPoliceComment/index.js b/.github/actions/javascript/proposalPoliceComment/index.js index 997a7577a8732..65c1c568adec8 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -12176,6 +12176,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 48d990ca57ff3..2eb37a3ad9f76 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -11917,6 +11917,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js index 3b8cb41338269..073820e9f47bf 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -12009,6 +12009,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 1f444b15d7b80..d3ef98f575997 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -11949,6 +11949,7 @@ class GithubUtils { console.log('Found the following Internal QA PRs:', internalQAPRMap); const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b)); diff --git a/.github/libs/GithubUtils.ts b/.github/libs/GithubUtils.ts index a9983db69dc70..1743cc592c9f4 100644 --- a/.github/libs/GithubUtils.ts +++ b/.github/libs/GithubUtils.ts @@ -334,6 +334,7 @@ class GithubUtils { const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : []; console.log('Found the following NO QA PRs:', noQAPRs); + // eslint-disable-next-line unicorn/prefer-set-has const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])]; const sortedPRList = [...new Set(arrayDifference(PRList, Object.keys(internalQAPRMap)))].sort( diff --git a/__mocks__/react-native-permissions.ts b/__mocks__/react-native-permissions.ts index d98b7f32a611b..d56f5296877d8 100644 --- a/__mocks__/react-native-permissions.ts +++ b/__mocks__/react-native-permissions.ts @@ -13,6 +13,7 @@ const request = jest.fn(() => RESULTS.GRANTED as string); const checkLocationAccuracy: jest.Mock = jest.fn(() => 'full'); const requestLocationAccuracy: jest.Mock = jest.fn(() => 'full'); +// eslint-disable-next-line unicorn/prefer-set-has const notificationOptions: string[] = ['alert', 'badge', 'sound', 'carPlay', 'criticalAlert', 'provisional']; const notificationSettings: NotificationSettings = { diff --git a/package-lock.json b/package-lock.json index c96954f7cff45..2db31eeb8501f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -244,7 +244,7 @@ "electron-builder": "26.0.19", "eslint": "^9.36.0", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-expensify": "2.0.92", + "eslint-config-expensify": "2.0.94", "eslint-config-prettier": "^9.1.0", "eslint-plugin-jest": "^29.0.1", "eslint-plugin-jsdoc": "^60.7.0", @@ -17460,9 +17460,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz", - "integrity": "sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw==", + "version": "2.8.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", + "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -17995,6 +17995,19 @@ "node": ">=8" } }, + "node_modules/builtin-modules": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz", + "integrity": "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bundle-name": { "version": "4.1.0", "dev": true, @@ -18261,9 +18274,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001743", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", - "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", "funding": [ { "type": "opencollective", @@ -18339,6 +18352,13 @@ "node": ">=0.8.0" } }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, "node_modules/char-regex": { "version": "1.0.2", "dev": true, @@ -18496,6 +18516,29 @@ "node": ">=0.10.0" } }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -19262,16 +19305,51 @@ } }, "node_modules/core-js-compat": { - "version": "3.38.1", + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", + "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", "license": "MIT", "dependencies": { - "browserslist": "^4.23.3" + "browserslist": "^4.26.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" } }, + "node_modules/core-js-compat/node_modules/browserslist": { + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/core-js-pure": { "version": "3.38.1", "dev": true, @@ -20845,9 +20923,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.222", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.222.tgz", - "integrity": "sha512-gA7psSwSwQRE60CEoLz6JBCQPIxNeuzB2nL8vE03GK/OHxlvykbLyeiumQy1iH5C2f3YbRAZpGCMT12a/9ih9w==", + "version": "1.5.243", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz", + "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", "license": "ISC" }, "node_modules/electron-winstaller": { @@ -21523,9 +21601,9 @@ } }, "node_modules/eslint-config-expensify": { - "version": "2.0.92", - "resolved": "https://registry.npmjs.org/eslint-config-expensify/-/eslint-config-expensify-2.0.92.tgz", - "integrity": "sha512-dL77CTd9BYNNbUq41u4dOz0k9FZqEjmpCqhNCADJSo6rlYsM4GrgHcl7lQm6eh3z40uL30Or7Pe7yI6E1tn2rQ==", + "version": "2.0.94", + "resolved": "https://registry.npmjs.org/eslint-config-expensify/-/eslint-config-expensify-2.0.94.tgz", + "integrity": "sha512-jw+p9geQ8F+xiDnxzN5KtgYs7yGmpw7uLDkMkzMm/YzG/uhvNRShuMxqSMv7SZfLHXgjgF77BmNe+zNKHSTFpA==", "dev": true, "license": "ISC", "dependencies": { @@ -21542,6 +21620,7 @@ "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-rulesdir": "^0.2.2", + "eslint-plugin-unicorn": "^61.0.2", "globals": "^15.14.0", "lodash": "^4.17.21", "underscore": "^1.13.6" @@ -22109,6 +22188,123 @@ "eslint": "^8.57.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-unicorn": { + "version": "61.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-61.0.2.tgz", + "integrity": "sha512-zLihukvneYT7f74GNbVJXfWIiNQmkc/a9vYBTE4qPkQZswolWNdu+Wsp9sIXno1JOzdn6OUwLPd19ekXVkahRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "@eslint-community/eslint-utils": "^4.7.0", + "@eslint/plugin-kit": "^0.3.3", + "change-case": "^5.4.4", + "ci-info": "^4.3.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.44.0", + "esquery": "^1.6.0", + "find-up-simple": "^1.0.1", + "globals": "^16.3.0", + "indent-string": "^5.0.0", + "is-builtin-module": "^5.0.0", + "jsesc": "^3.1.0", + "pluralize": "^8.0.0", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.12.0", + "semver": "^7.7.2", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": "^20.10.0 || >=21.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=9.29.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/globals": { + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", + "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/strip-indent": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", + "integrity": "sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint-plugin-you-dont-need-lodash-underscore": { "version": "6.14.0", "dev": true, @@ -23850,6 +24046,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-up-simple": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", + "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/find-up/node_modules/path-exists": { "version": "4.0.0", "license": "MIT", @@ -25764,6 +25973,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-builtin-module": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-5.0.0.tgz", + "integrity": "sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-modules": "^5.0.0" + }, + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-callable": { "version": "1.2.7", "license": "MIT", @@ -30876,9 +31101,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", - "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.26.tgz", + "integrity": "sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==", "license": "MIT" }, "node_modules/node-stream-zip": { @@ -32112,6 +32337,16 @@ "node": ">=10.4.0" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/pngjs": { "version": "5.0.0", "license": "MIT", @@ -34313,6 +34548,16 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -34344,6 +34589,32 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/regjsparser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.0.2" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/relateurl": { "version": "0.2.7", "dev": true, @@ -37801,9 +38072,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "funding": [ { "type": "opencollective", diff --git a/package.json b/package.json index a5de27b72367c..ebada6a8dc352 100644 --- a/package.json +++ b/package.json @@ -314,7 +314,7 @@ "electron-builder": "26.0.19", "eslint": "^9.36.0", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-expensify": "2.0.92", + "eslint-config-expensify": "2.0.94", "eslint-config-prettier": "^9.1.0", "eslint-plugin-jest": "^29.0.1", "eslint-plugin-jsdoc": "^60.7.0", diff --git a/scripts/stubReactNative.js b/scripts/stubReactNative.js index 0275fd501202b..c68631ee344a4 100644 --- a/scripts/stubReactNative.js +++ b/scripts/stubReactNative.js @@ -4,6 +4,7 @@ const Module = require('module'); const originalRequire = Module.prototype.require; // List of modules to stub (we don't need these in scripts) +// eslint-disable-next-line unicorn/prefer-set-has const MODULES_TO_STUB = [ 'react-native', 'react-native-config', diff --git a/src/components/Form/InputWrapper.tsx b/src/components/Form/InputWrapper.tsx index ed1a4b2901cb3..0db5e1a11e98e 100644 --- a/src/components/Form/InputWrapper.tsx +++ b/src/components/Form/InputWrapper.tsx @@ -12,6 +12,7 @@ import type {InputComponentBaseProps, InputComponentValueProps, ValidInputs, Val type TextInputBasedComponents = [ComponentType, ComponentType]; +// eslint-disable-next-line unicorn/prefer-set-has const textInputBasedComponents: TextInputBasedComponents = [TextInput, RoomNameInput]; type ComputedComponentSpecificRegistrationParams = { diff --git a/src/components/ReportActionItem/MoneyRequestReceiptView.tsx b/src/components/ReportActionItem/MoneyRequestReceiptView.tsx index b8709d2861867..fce65f9885736 100644 --- a/src/components/ReportActionItem/MoneyRequestReceiptView.tsx +++ b/src/components/ReportActionItem/MoneyRequestReceiptView.tsx @@ -74,6 +74,7 @@ type MoneyRequestReceiptViewProps = { isDisplayedInWideRHP?: boolean; }; +// eslint-disable-next-line unicorn/prefer-set-has const receiptImageViolationNames: OnyxTypes.ViolationName[] = [ CONST.VIOLATIONS.RECEIPT_REQUIRED, CONST.VIOLATIONS.RECEIPT_NOT_SMART_SCANNED, @@ -83,6 +84,7 @@ const receiptImageViolationNames: OnyxTypes.ViolationName[] = [ CONST.VIOLATIONS.RECEIPT_GENERATED_WITH_AI, ]; +// eslint-disable-next-line unicorn/prefer-set-has const receiptFieldViolationNames: OnyxTypes.ViolationName[] = [CONST.VIOLATIONS.MODIFIED_AMOUNT, CONST.VIOLATIONS.MODIFIED_DATE]; function MoneyRequestReceiptView({ diff --git a/src/components/ScrollOffsetContextProvider.tsx b/src/components/ScrollOffsetContextProvider.tsx index bc451045ccd25..434acd7387351 100644 --- a/src/components/ScrollOffsetContextProvider.tsx +++ b/src/components/ScrollOffsetContextProvider.tsx @@ -101,6 +101,7 @@ function ScrollOffsetContextProvider({children}: ScrollOffsetContextProviderProp const cleanStaleScrollOffsets: ScrollOffsetContextValue['cleanStaleScrollOffsets'] = useCallback( (state) => { const sidebarRoutes = state.routes.filter((route) => isSidebarScreenName(route.name)); + // eslint-disable-next-line unicorn/prefer-set-has const existingScreenKeys = sidebarRoutes.map(getKey); const focusedRoute = findFocusedRoute(state); diff --git a/src/components/Search/SearchAutocompleteList.tsx b/src/components/Search/SearchAutocompleteList.tsx index 24d7afbdb776f..8c4bcb15ca6ec 100644 --- a/src/components/Search/SearchAutocompleteList.tsx +++ b/src/components/Search/SearchAutocompleteList.tsx @@ -331,6 +331,7 @@ function SearchAutocompleteList({ } } + // eslint-disable-next-line unicorn/prefer-set-has const alreadyAutocompletedKeys = ranges .filter((range) => { return autocompleteKey && range.key === autocompleteKey; diff --git a/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx b/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx index 118dd17a8c689..eee9c885e1055 100644 --- a/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx +++ b/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx @@ -618,7 +618,7 @@ function SearchFiltersBar({ const hiddenSelectedFilters = useMemo(() => { const advancedSearchFiltersKeys = typeFiltersKeys.flat(); - + // eslint-disable-next-line unicorn/prefer-set-has const exposedFiltersKeys = filters.flatMap((filter) => { const dateFilterKey = DATE_FILTER_KEYS.find((key) => filter.filterKey.startsWith(key)); if (dateFilterKey) { diff --git a/src/components/TagPicker.tsx b/src/components/TagPicker.tsx index 14bfebb64f137..9de3e33731b3c 100644 --- a/src/components/TagPicker.tsx +++ b/src/components/TagPicker.tsx @@ -99,6 +99,7 @@ function TagPicker({ }); } + // eslint-disable-next-line unicorn/prefer-set-has const selectedNames = selectedOptions.map((s) => s.name); return [...selectedOptions, ...Object.values(policyTagList.tags).filter((policyTag) => policyTag.enabled && !selectedNames.includes(policyTag.name))]; diff --git a/src/components/UploadFile.tsx b/src/components/UploadFile.tsx index 1970204e08557..0d4704c0cd8bd 100644 --- a/src/components/UploadFile.tsx +++ b/src/components/UploadFile.tsx @@ -85,6 +85,7 @@ function UploadFile({ } if (acceptedFileTypes.length > 0) { + // eslint-disable-next-line unicorn/prefer-set-has const filesExtensions = files.map((file) => splitExtensionFromFileName(file?.name ?? '').fileExtension.toLowerCase()); if (acceptedFileTypes.every((element) => !filesExtensions.includes(element as string))) { @@ -93,6 +94,7 @@ function UploadFile({ } } + // eslint-disable-next-line unicorn/prefer-set-has const uploadedFilesNames = uploadedFiles.map((uploadedFile) => uploadedFile.name); const newFilesToUpload = files.filter((file) => !uploadedFilesNames.includes(file.name)); diff --git a/src/hooks/useAdvancedSearchFilters.ts b/src/hooks/useAdvancedSearchFilters.ts index 78ebfb8166195..8a9cfd839c1d2 100644 --- a/src/hooks/useAdvancedSearchFilters.ts +++ b/src/hooks/useAdvancedSearchFilters.ts @@ -241,6 +241,7 @@ function useAdvancedSearchFilters() { }); // When looking if a user has any categories to display, we want to ignore the policies that are of type PERSONAL + // eslint-disable-next-line unicorn/prefer-set-has const nonPersonalPolicyCategoryIds = Object.values(policies) .filter((policy): policy is NonNullable => !!(policy && policy.type !== CONST.POLICY.TYPE.PERSONAL)) .map((policy) => `${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policy.id}`); diff --git a/src/hooks/useDeleteTransactions.ts b/src/hooks/useDeleteTransactions.ts index 7f95ee41cf11b..cd3ee488d9392 100644 --- a/src/hooks/useDeleteTransactions.ts +++ b/src/hooks/useDeleteTransactions.ts @@ -96,6 +96,7 @@ function useDeleteTransactions({report, reportActions, policy}: UseDeleteTransac ); Object.keys(splitTransactionsByOriginalTransactionID).forEach((transactionID) => { + // eslint-disable-next-line unicorn/prefer-set-has const splitIDs = (splitTransactionsByOriginalTransactionID[transactionID] ?? []).map((transaction) => transaction.transactionID); const childTransactions = getChildTransactions(allTransactions, allReports, transactionID).filter( (transaction) => !splitIDs.includes(transaction?.transactionID ?? String(CONST.DEFAULT_NUMBER_ID)), diff --git a/src/hooks/useSidebarOrderedReports.tsx b/src/hooks/useSidebarOrderedReports.tsx index b139457b0eaac..f06b006a826e7 100644 --- a/src/hooks/useSidebarOrderedReports.tsx +++ b/src/hooks/useSidebarOrderedReports.tsx @@ -111,6 +111,7 @@ function SidebarOrderedReportsContextProvider({ } else if (reportsDraftsUpdates) { reportsToUpdate = Object.keys(reportsDraftsUpdates).map((key) => key.replace(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, ONYXKEYS.COLLECTION.REPORT)); } else if (policiesUpdates) { + // eslint-disable-next-line unicorn/prefer-set-has const updatedPolicies = Object.keys(policiesUpdates).map((key) => key.replace(ONYXKEYS.COLLECTION.POLICY, '')); reportsToUpdate = Object.entries(chatReports ?? {}) .filter(([, value]) => { diff --git a/src/libs/CardUtils.ts b/src/libs/CardUtils.ts index 5abc29ee9a54e..652e0cfeeb811 100644 --- a/src/libs/CardUtils.ts +++ b/src/libs/CardUtils.ts @@ -529,6 +529,7 @@ function isSelectedFeedExpired(directFeed: DirectCardFeedData | undefined): bool /** Returns list of cards which can be assigned */ function getFilteredCardList(list: WorkspaceCardsList | undefined, directFeed: DirectCardFeedData | undefined, workspaceCardFeeds: OnyxCollection) { const {cardList: customFeedCardsToAssign, ...cards} = list ?? {}; + // eslint-disable-next-line unicorn/prefer-set-has const assignedCards = Object.values(cards).map((card) => card.cardName); // Get cards assigned across all workspaces @@ -576,6 +577,7 @@ function checkIfNewFeedConnected(prevFeedsData: CompanyFeeds, currentFeedsData: } function filterInactiveCards(cards: CardList | undefined): CardList { + // eslint-disable-next-line unicorn/prefer-set-has const closedStates: number[] = [CONST.EXPENSIFY_CARD.STATE.CLOSED, CONST.EXPENSIFY_CARD.STATE.STATE_DEACTIVATED, CONST.EXPENSIFY_CARD.STATE.STATE_SUSPENDED]; return filterObject(cards ?? {}, (key, card) => !closedStates.includes(card.state)); } diff --git a/src/libs/CategoryOptionListUtils.ts b/src/libs/CategoryOptionListUtils.ts index 5605f9814374c..be2569e8447b1 100644 --- a/src/libs/CategoryOptionListUtils.ts +++ b/src/libs/CategoryOptionListUtils.ts @@ -104,6 +104,7 @@ function getCategoryListSections({ }): CategoryTreeSection[] { const sortedCategories = sortCategories(categories, localeCompare); const enabledCategories = Object.values(sortedCategories).filter((category) => category.enabled); + // eslint-disable-next-line unicorn/prefer-set-has const enabledCategoriesNames = enabledCategories.map((category) => category.name); const selectedOptionsWithDisabledState: Category[] = []; const categorySections: CategoryTreeSection[] = []; @@ -162,6 +163,7 @@ function getCategoryListSections({ }); } + // eslint-disable-next-line unicorn/prefer-set-has const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.name); const filteredCategories = enabledCategories.filter((category) => !selectedOptionNames.includes(category.name)); diff --git a/src/libs/ExportOnyxState/common.ts b/src/libs/ExportOnyxState/common.ts index abe4533d1f7a9..a2a76551dbece 100644 --- a/src/libs/ExportOnyxState/common.ts +++ b/src/libs/ExportOnyxState/common.ts @@ -75,6 +75,7 @@ const ONYX_KEY_EXPORT_RULES: Record = { }, }; +// eslint-disable-next-line unicorn/prefer-set-has const onyxKeysToRemove: Array> = [ ONYXKEYS.NVP_PRIVATE_PUSH_NOTIFICATION_ID, ONYXKEYS.NVP_PRIVATE_STRIPE_CUSTOMER_ID, @@ -85,6 +86,7 @@ const onyxKeysToRemove: Array> = [ ONYXKEYS.ONFIDO_APPLICANT_ID, ]; +// eslint-disable-next-line unicorn/prefer-set-has const keysToMask = [ 'addressCity', 'addressName', @@ -130,8 +132,10 @@ const keysToMask = [ 'zipCode', ]; +// eslint-disable-next-line unicorn/prefer-set-has const amountKeysToRandomize = ['amount', 'modifiedAmount', 'originalAmount', 'total', 'unheldTotal', 'unheldNonReimbursableTotal', 'nonReimbursableTotal']; +// eslint-disable-next-line unicorn/prefer-set-has const nodesToFullyMask = ['reservationList']; const emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/; diff --git a/src/libs/HttpUtils.ts b/src/libs/HttpUtils.ts index 90ce7c50ceddf..28c441c4dcd20 100644 --- a/src/libs/HttpUtils.ts +++ b/src/libs/HttpUtils.ts @@ -42,6 +42,7 @@ abortControllerMap.set(ABORT_COMMANDS.SearchForReports, new AbortController()); /** * The API commands that require the skew calculation */ +// eslint-disable-next-line unicorn/prefer-set-has const addSkewList: string[] = [WRITE_COMMANDS.OPEN_REPORT, SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP, WRITE_COMMANDS.OPEN_APP]; /** diff --git a/src/libs/Middleware/SaveResponseInOnyx.ts b/src/libs/Middleware/SaveResponseInOnyx.ts index 2b432cd52608b..8729444695269 100644 --- a/src/libs/Middleware/SaveResponseInOnyx.ts +++ b/src/libs/Middleware/SaveResponseInOnyx.ts @@ -5,6 +5,7 @@ import type Middleware from './types'; // If we're executing any of these requests, we don't need to trigger our OnyxUpdates flow to update the current data even if our current value is out of // date because all these requests are updating the app to the most current state. +// eslint-disable-next-line unicorn/prefer-set-has const requestsToIgnoreLastUpdateID: string[] = [ WRITE_COMMANDS.OPEN_APP, SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP, diff --git a/src/libs/MoneyRequestReportUtils.ts b/src/libs/MoneyRequestReportUtils.ts index 89f75a24f5512..28706b8038899 100644 --- a/src/libs/MoneyRequestReportUtils.ts +++ b/src/libs/MoneyRequestReportUtils.ts @@ -21,6 +21,7 @@ import {isTransactionPendingDelete} from './TransactionUtils'; * In MoneyRequestReport we filter out some IOU action types, because expense/transaction data is displayed in a separate list * at the top */ +// eslint-disable-next-line unicorn/prefer-set-has const IOU_ACTIONS_TO_FILTER_OUT: Array = [CONST.IOU.REPORT_ACTION_TYPE.CREATE, CONST.IOU.REPORT_ACTION_TYPE.TRACK]; /** diff --git a/src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts b/src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts index 3cdcf9fe2cf7f..d40cef6a074c1 100644 --- a/src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts +++ b/src/libs/Navigation/AppNavigator/createRootStackNavigator/GetStateForActionHandlers.ts @@ -11,6 +11,7 @@ import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import type {OpenWorkspaceSplitActionType, PushActionType, ReplaceActionType, ToggleSidePanelWithHistoryActionType} from './types'; +// eslint-disable-next-line unicorn/prefer-set-has const MODAL_ROUTES_TO_DISMISS: string[] = [ NAVIGATORS.WORKSPACE_SPLIT_NAVIGATOR, NAVIGATORS.RIGHT_MODAL_NAVIGATOR, diff --git a/src/libs/Navigation/AppNavigator/createSplitNavigator/usePreserveNavigatorState.ts b/src/libs/Navigation/AppNavigator/createSplitNavigator/usePreserveNavigatorState.ts index 8cbd48f5a98e0..a234b530a49fa 100644 --- a/src/libs/Navigation/AppNavigator/createSplitNavigator/usePreserveNavigatorState.ts +++ b/src/libs/Navigation/AppNavigator/createSplitNavigator/usePreserveNavigatorState.ts @@ -4,6 +4,7 @@ import {useEffect} from 'react'; const preservedNavigatorStates: Record> = {}; const cleanPreservedNavigatorStates = (state: NavigationState) => { + // eslint-disable-next-line unicorn/prefer-set-has const currentSplitNavigatorKeys = state.routes.map((route) => route.key); for (const key of Object.keys(preservedNavigatorStates)) { diff --git a/src/libs/Navigation/Navigation.ts b/src/libs/Navigation/Navigation.ts index 1549486c1849f..b751f16aa4079 100644 --- a/src/libs/Navigation/Navigation.ts +++ b/src/libs/Navigation/Navigation.ts @@ -35,6 +35,7 @@ import navigationRef from './navigationRef'; import type {NavigationPartialRoute, NavigationRoute, NavigationStateRoute, ReportsSplitNavigatorParamList, RootNavigatorParamList, State} from './types'; // Routes which are part of the flow to set up 2FA +// eslint-disable-next-line unicorn/prefer-set-has const SET_UP_2FA_ROUTES: Route[] = [ ROUTES.REQUIRE_TWO_FACTOR_AUTH, ROUTES.SETTINGS_2FA_ROOT.getRoute(ROUTES.REQUIRE_TWO_FACTOR_AUTH), diff --git a/src/libs/PerDiemRequestUtils.ts b/src/libs/PerDiemRequestUtils.ts index 17f7c16093ab6..8749a00a68bfb 100644 --- a/src/libs/PerDiemRequestUtils.ts +++ b/src/libs/PerDiemRequestUtils.ts @@ -129,6 +129,7 @@ function getDestinationListSections({ }); } + // eslint-disable-next-line unicorn/prefer-set-has const selectedOptionRateIDs = selectedOptions.map((selectedOption) => selectedOption.rateID); if (sortedDestinations.length < CONST.STANDARD_LIST_ITEM_LIMIT) { diff --git a/src/libs/PolicyDistanceRatesUtils.ts b/src/libs/PolicyDistanceRatesUtils.ts index b0139e6765eb2..eef27ee44aa39 100644 --- a/src/libs/PolicyDistanceRatesUtils.ts +++ b/src/libs/PolicyDistanceRatesUtils.ts @@ -70,6 +70,7 @@ function buildOnyxDataForPolicyDistanceRateUpdates(policyID: string, customUnit: const optimisticRates: Record> = {}; const successRates: Record> = {}; const failureRates: Record> = {}; + // eslint-disable-next-line unicorn/prefer-set-has const rateIDs = customUnitRates.map((rate) => rate.customUnitRateID); for (const rateID of Object.keys(customUnit.rates)) { diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 6be2703c591b4..e814d44441812 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -842,6 +842,7 @@ function isActionableWhisper( } const {POLICY_CHANGE_LOG: policyChangelogTypes, ROOM_CHANGE_LOG: roomChangeLogTypes, ...otherActionTypes} = CONST.REPORT.ACTIONS.TYPE; +// eslint-disable-next-line unicorn/prefer-set-has const supportedActionTypes: ReportActionName[] = [...Object.values(otherActionTypes), ...Object.values(policyChangelogTypes), ...Object.values(roomChangeLogTypes)]; /** diff --git a/src/libs/SearchQueryUtils.ts b/src/libs/SearchQueryUtils.ts index c41c2a7f74f4e..2d4b53d7817b9 100644 --- a/src/libs/SearchQueryUtils.ts +++ b/src/libs/SearchQueryUtils.ts @@ -186,6 +186,7 @@ function buildAmountFilterQuery(filterKey: SearchAmountFilterKeys, filterValues: */ function buildFilterValuesString(filterName: string, queryFilters: QueryFilter[]) { const delimiter = filterName === CONST.SEARCH.SYNTAX_FILTER_KEYS.KEYWORD ? ' ' : ','; + // eslint-disable-next-line unicorn/prefer-set-has const allowedOps: string[] = [CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO, CONST.SEARCH.SYNTAX_OPERATORS.NOT_EQUAL_TO]; let filterValueString = ''; diff --git a/src/libs/SelectionScraper/index.ts b/src/libs/SelectionScraper/index.ts index a4954d6525ca2..09ca9c999e39d 100644 --- a/src/libs/SelectionScraper/index.ts +++ b/src/libs/SelectionScraper/index.ts @@ -6,6 +6,7 @@ import {parseDocument} from 'htmlparser2'; import CONST from '@src/CONST'; import type GetCurrentSelection from './types'; +// eslint-disable-next-line unicorn/prefer-set-has const markdownElements = ['h1', 'strong', 'em', 'del', 'blockquote', 'q', 'code', 'pre', 'a', 'br', 'li', 'ul', 'ol', 'b', 'i', 's', 'mention-user']; const tagAttribute = 'data-testid'; diff --git a/src/libs/TagsOptionsListUtils.ts b/src/libs/TagsOptionsListUtils.ts index cc6c542cdba37..9038aaf6ac8e9 100644 --- a/src/libs/TagsOptionsListUtils.ts +++ b/src/libs/TagsOptionsListUtils.ts @@ -69,8 +69,10 @@ function getTagListSections({ const tagSections = []; const sortedTags = sortTags(tags, localeCompare); + // eslint-disable-next-line unicorn/prefer-set-has const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.name); const enabledTags = sortedTags.filter((tag) => tag.enabled); + // eslint-disable-next-line unicorn/prefer-set-has const enabledTagsNames = enabledTags.map((tag) => tag.name); const enabledTagsWithoutSelectedOptions = enabledTags.filter((tag) => !selectedOptionNames.includes(tag.name)); const selectedTagsWithDisabledState: SelectedTagOption[] = []; diff --git a/src/libs/TaxOptionsListUtils.ts b/src/libs/TaxOptionsListUtils.ts index 01f2f6f1281cd..828ff85f584c6 100644 --- a/src/libs/TaxOptionsListUtils.ts +++ b/src/libs/TaxOptionsListUtils.ts @@ -74,8 +74,10 @@ function getTaxRatesSection({ const taxes = transformedTaxRates(policy, transaction); const sortedTaxRates = sortTaxRates(taxes, localeCompare); + // eslint-disable-next-line unicorn/prefer-set-has const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.modifiedName); const enabledTaxRates = sortedTaxRates.filter((taxRate) => !taxRate.isDisabled); + // eslint-disable-next-line unicorn/prefer-set-has const enabledTaxRatesNames = enabledTaxRates.map((tax) => tax.modifiedName); const enabledTaxRatesWithoutSelectedOptions = enabledTaxRates.filter((tax) => tax.modifiedName && !selectedOptionNames.includes(tax.modifiedName)); const selectedTaxRateWithDisabledState: Tax[] = []; diff --git a/src/libs/actions/Policy/DistanceRate.ts b/src/libs/actions/Policy/DistanceRate.ts index 03a6cf7e36a0e..065df98f75317 100644 --- a/src/libs/actions/Policy/DistanceRate.ts +++ b/src/libs/actions/Policy/DistanceRate.ts @@ -324,6 +324,7 @@ function setPolicyDistanceRatesEnabled(policyID: string, customUnit: CustomUnit, const optimisticRates: Record> = {}; const successRates: Record> = {}; const failureRates: Record> = {}; + // eslint-disable-next-line unicorn/prefer-set-has const rateIDs = customUnitRates.map((rate) => rate.customUnitRateID); for (const rateID of Object.keys(currentRates)) { diff --git a/src/libs/actions/QueuedOnyxUpdates.ts b/src/libs/actions/QueuedOnyxUpdates.ts index 4af625b21305c..ad129ca86773d 100644 --- a/src/libs/actions/QueuedOnyxUpdates.ts +++ b/src/libs/actions/QueuedOnyxUpdates.ts @@ -32,6 +32,7 @@ function flushQueue(): Promise { queuedOnyxUpdates = []; if (!currentAccountID && !CONFIG.IS_TEST_ENV && !CONFIG.E2E_TESTING) { + // eslint-disable-next-line unicorn/prefer-set-has const preservedKeys: OnyxKey[] = [ ONYXKEYS.NVP_TRY_NEW_DOT, ONYXKEYS.NVP_TRY_FOCUS_MODE, diff --git a/src/libs/requireParameters.ts b/src/libs/requireParameters.ts index ebeb55e254e0b..46d74bc44bf80 100644 --- a/src/libs/requireParameters.ts +++ b/src/libs/requireParameters.ts @@ -11,6 +11,7 @@ export default function requireParameters(parameterNames: string[], parameters: return; } + // eslint-disable-next-line unicorn/prefer-set-has const propertiesToRedact = ['authToken', 'password', 'partnerUserSecret', 'twoFactorAuthCode']; const parametersCopy = {...parameters}; Object.keys(parametersCopy).forEach((key) => { diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index 9bf7de910052b..2cd590e5258d9 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -48,6 +48,7 @@ import ROUTES from '@src/ROUTES'; import type {SelectedParticipant} from '@src/types/onyx/NewGroupChatDraft'; import KeyboardUtils from '@src/utils/keyboard'; +// eslint-disable-next-line unicorn/prefer-set-has const excludedGroupEmails: string[] = CONST.EXPENSIFY_EMAILS.filter((value) => value !== CONST.EMAIL.CONCIERGE); type SelectedOption = ListItem & diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index 552a99741a2d2..030c539f78fd1 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -147,6 +147,7 @@ function RoomInvitePage({ }); // Filtering out selected users from the search results + // eslint-disable-next-line unicorn/prefer-set-has const selectedLogins = selectedOptions.map(({login}) => login); const personalDetailsWithoutSelected = personalDetails ? personalDetails.filter(({login}) => !selectedLogins.includes(login)) : []; const personalDetailsFormatted = personalDetailsWithoutSelected.map((personalDetail) => formatMemberForList(personalDetail)); diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 0e8245459f1b1..e3e35507a64d7 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -928,6 +928,7 @@ const ContextMenuActions: ContextMenuAction[] = [ }, ]; +// eslint-disable-next-line unicorn/prefer-set-has const restrictedReadOnlyActions: TranslationPaths[] = ['reportActionContextMenu.replyInThread', 'reportActionContextMenu.editAction', 'reportActionContextMenu.joinThread', 'common.delete']; const RestrictedReadOnlyContextMenuActions: ContextMenuAction[] = ContextMenuActions.filter( diff --git a/src/pages/home/report/LinkPreviewer.tsx b/src/pages/home/report/LinkPreviewer.tsx index 0731e7395a22c..6762963e7a8e2 100644 --- a/src/pages/home/report/LinkPreviewer.tsx +++ b/src/pages/home/report/LinkPreviewer.tsx @@ -8,6 +8,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import variables from '@styles/variables'; import type {LinkMetadata} from '@src/types/onyx/ReportAction'; +// eslint-disable-next-line unicorn/prefer-set-has const IMAGE_TYPES = ['jpg', 'jpeg', 'png']; const MAX_IMAGE_HEIGHT = 180; const MAX_IMAGE_WIDTH = 340; diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx index 53317976b2aa5..3bedf50e15e22 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx @@ -820,6 +820,7 @@ function IOURequestStepConfirmation({ // Filter out participants with an amount equal to O if (iouType === CONST.IOU.TYPE.SPLIT && transaction?.splitShares) { + // eslint-disable-next-line unicorn/prefer-set-has const participantsWithAmount = Object.keys(transaction.splitShares ?? {}) .filter((accountID: string): boolean => (transaction?.splitShares?.[Number(accountID)]?.amount ?? 0) > 0) .map((accountID) => Number(accountID)); diff --git a/src/pages/settings/Wallet/TransferBalancePage.tsx b/src/pages/settings/Wallet/TransferBalancePage.tsx index 08ac2fa509e30..8198c23dcdeb6 100644 --- a/src/pages/settings/Wallet/TransferBalancePage.tsx +++ b/src/pages/settings/Wallet/TransferBalancePage.tsx @@ -34,6 +34,7 @@ import type PaymentMethod from '@src/types/onyx/PaymentMethod'; import type {FilterMethodPaymentType} from '@src/types/onyx/WalletTransfer'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; +// eslint-disable-next-line unicorn/prefer-set-has const TRANSFER_TIER_NAMES: string[] = [CONST.WALLET.TIER_NAME.GOLD, CONST.WALLET.TIER_NAME.PLATINUM]; function TransferBalancePage() { diff --git a/src/pages/workspace/receiptPartners/InviteReceiptPartnerPolicyPage.tsx b/src/pages/workspace/receiptPartners/InviteReceiptPartnerPolicyPage.tsx index c6fb31f9ec4bc..9b65f8404037f 100644 --- a/src/pages/workspace/receiptPartners/InviteReceiptPartnerPolicyPage.tsx +++ b/src/pages/workspace/receiptPartners/InviteReceiptPartnerPolicyPage.tsx @@ -120,6 +120,7 @@ function InviteReceiptPartnerPolicyPage({route}: InviteReceiptPartnerPolicyPageP } // Combine selected members with unselected members + // eslint-disable-next-line unicorn/prefer-set-has const selectedLogins = selectedOptions.map(({login}) => login); const unselectedMembers = membersToDisplay.filter(({login}) => !selectedLogins.includes(login)); diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index fda0a57844382..31166ba23589d 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -752,6 +752,7 @@ function getVerticalPaddingDiffFromStyle(textInputContainerStyles: ViewStyle): n * Checks to see if the iOS device has safe areas or not */ function hasSafeAreas(windowWidth: number, windowHeight: number): boolean { + // eslint-disable-next-line unicorn/prefer-set-has const heightsIPhonesWithNotches = [812, 896, 844, 926]; return heightsIPhonesWithNotches.includes(windowHeight) || heightsIPhonesWithNotches.includes(windowWidth); } diff --git a/tests/actions/TourTest.ts b/tests/actions/TourTest.ts index 8a30912889a34..2b99c2dbc4f10 100644 --- a/tests/actions/TourTest.ts +++ b/tests/actions/TourTest.ts @@ -54,6 +54,7 @@ describe('actions/Tour', () => { describe('NewDot users', () => { const onboardingChoices = Object.values(CONST.ONBOARDING_CHOICES); + // eslint-disable-next-line unicorn/prefer-set-has const onboardingDemoChoices: OnboardingPurpose[] = [CONST.ONBOARDING_CHOICES.MANAGE_TEAM, CONST.ONBOARDING_CHOICES.TEST_DRIVE_RECEIVER, CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE]; const accountID = 2; const conciergeChatReport: Report = LHNTestUtils.getFakeReport([accountID, CONST.ACCOUNT_ID.CONCIERGE]); diff --git a/tests/unit/OptionsListUtilsTest.tsx b/tests/unit/OptionsListUtilsTest.tsx index 416d71484830b..10d1e19b6fb79 100644 --- a/tests/unit/OptionsListUtilsTest.tsx +++ b/tests/unit/OptionsListUtilsTest.tsx @@ -1065,6 +1065,7 @@ describe('OptionsListUtils', () => { // Given a set of reports and personalDetails // When we call getValidOptions with no search value const results = getValidOptions({reports: OPTIONS.reports, personalDetails: OPTIONS.personalDetails}, {}, nvpDismissedProductTraining); + // eslint-disable-next-line unicorn/prefer-set-has const reportLogins = results.recentReports.map((reportOption) => reportOption.login); const personalDetailsOverlapWithReports = results.personalDetails.every((personalDetailOption) => reportLogins.includes(personalDetailOption.login));