Fix Changed File ESLint for #11685#55697
Conversation
|
Hey @brunovjk, since this is just ESLint changes, I'll ask an internal engineer to review. Sorry for the noise |
|
Fixed ESLint for all the files from this list except for |
| const itemReportActions = reportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`]; | ||
| const itemParentReportActions = reportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${itemFullReport?.parentReportID}`]; | ||
| const itemParentReportAction = itemParentReportActions?.[itemFullReport?.parentReportActionID ?? '-1']; | ||
| const itemParentReportAction = itemFullReport?.parentReportActionID ? itemParentReportActions?.[itemFullReport?.parentReportActionID] : undefined; |
There was a problem hiding this comment.
I used undefined here since that is what is done in this example
There was a problem hiding this comment.
I can't see the same pattern where you have linked, can you please cross-check and confirm if you have linked correctly?
There was a problem hiding this comment.
I don't see you doing the same for line 121? Is that because reportaction can be undefined but same is not true for report?
There was a problem hiding this comment.
Sorry had the wrong link, it's this one right here:
https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#case-2-type-undefined-cannot-be-used-as-an-index-type
There was a problem hiding this comment.
Thanks, that looks good to me. 👍
| ? ReportActionsUtils.getOriginalMessage(itemParentReportAction)?.IOUTransactionID ?? '-1' | ||
| : '-1'; | ||
| const transactionID = isMoneyRequestAction(itemParentReportAction) | ||
| ? getOriginalMessage(itemParentReportAction)?.IOUTransactionID ?? CONST.DEFAULT_NUMBER_ID |
There was a problem hiding this comment.
I used CONST.DEFAULT_NUMBER_ID here since that is what is done here
Reviewer Checklist
Screenshots/VideosN/A removing duplicate code Android: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/techievivek in version: 9.0.90-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.90-6 🚀
|
|
|
||
| const isMoneyRequest = useMemo(() => ReportUtils.isMoneyRequest(childReport), [childReport]); | ||
| const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(childReport); | ||
| const isMoneyRequest = useMemo(() => ReportUtilsIsMoneyRequestReport(childReport), [childReport]); |
There was a problem hiding this comment.
We should have used ReportUtilsIsMoneyRequest here. Context: #55827 (comment)

Explanation of Change
Fixed Issues
$ #55658
PROPOSAL:
Tests
N/A ESLint Change
Offline tests
N/A ESLint Change
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
N/A ESLint Change
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop