Skip to content

Commit dbec56a

Browse files
authored
Merge pull request Expensify#76007 from Expensify/vit-75994
[NoQA] Fix lint on main
2 parents 088f5b3 + bfebe58 commit dbec56a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libs/ReportLayoutUtils.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ function groupTransactionsByCategory(transactions: Transaction[], report: OnyxEn
1616

1717
const groups = new Map<string, Transaction[]>();
1818

19-
transactions.forEach((transaction) => {
19+
for (const transaction of transactions) {
2020
const category = getCategory(transaction);
2121
const categoryKey = category || '';
2222

2323
if (!groups.has(categoryKey)) {
2424
groups.set(categoryKey, []);
2525
}
2626
groups.get(categoryKey)?.push(transaction);
27-
});
27+
}
2828

2929
const result: GroupedTransactions[] = [];
30-
groups.forEach((transactionList, categoryKey) => {
30+
for (const [categoryKey, transactionList] of groups) {
3131
// Translation handled at component level
3232
const displayName = categoryKey;
3333

@@ -47,7 +47,7 @@ function groupTransactionsByCategory(transactions: Transaction[], report: OnyxEn
4747
totalAmount,
4848
isExpanded: true,
4949
});
50-
});
50+
}
5151

5252
// Sort alphabetically (A→Z), empty keys (uncategorized) at the end
5353
return result.sort((a, b) => {
@@ -72,18 +72,18 @@ function groupTransactionsByTag(transactions: Transaction[], report: OnyxEntry<R
7272

7373
const groups = new Map<string, Transaction[]>();
7474

75-
transactions.forEach((transaction) => {
75+
for (const transaction of transactions) {
7676
const tag = getTag(transaction);
7777
const tagKey = tag || '';
7878

7979
if (!groups.has(tagKey)) {
8080
groups.set(tagKey, []);
8181
}
8282
groups.get(tagKey)?.push(transaction);
83-
});
83+
}
8484

8585
const result: GroupedTransactions[] = [];
86-
groups.forEach((transactionList, tagKey) => {
86+
for (const [tagKey, transactionList] of groups) {
8787
// Translation handled at component level
8888
const displayName = tagKey;
8989

@@ -103,7 +103,7 @@ function groupTransactionsByTag(transactions: Transaction[], report: OnyxEntry<R
103103
totalAmount,
104104
isExpanded: true,
105105
});
106-
});
106+
}
107107

108108
// Sort alphabetically (A→Z), empty keys (untagged) at the end
109109
return result.sort((a, b) => {

0 commit comments

Comments
 (0)