mirror of
https://github.com/actualbudget/actual.git
synced 2026-10-12 02:10:19 +00:00
[AI] Promote typescript/no-for-in-array lint rule from warn to error (#7193)
* [AI] Promote typescript/no-for-in-array lint rule from warn to error Convert the oxlint rule from "warn" to "error" as noted by the existing TODO comment, and fix the three violations by replacing for-in loops with for-of using .entries(). https://claude.ai/code/session_01N6F8DMzUVDxNJC56jMGknf * Add release notes for PR #7193 --------- Co-authored-by: Claude <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude
github-actions[bot]
parent
541df52441
commit
d6dcc30e44
+1
-1
@@ -105,7 +105,7 @@
|
||||
"typescript/no-floating-promises": "error",
|
||||
"typescript/require-array-sort-compare": "error",
|
||||
"typescript/unbound-method": "error",
|
||||
"typescript/no-for-in-array": "warn", // TODO: covert to error
|
||||
"typescript/no-for-in-array": "error",
|
||||
"typescript/restrict-template-expressions": "error",
|
||||
|
||||
// Import rules
|
||||
|
||||
@@ -543,7 +543,7 @@ describe('Transactions', () => {
|
||||
'{Shift>}[Enter]{/Shift}',
|
||||
];
|
||||
|
||||
for (const idx in ks) {
|
||||
for (const [idx] of ks.entries()) {
|
||||
const input = await editField(container, 'notes', 2);
|
||||
const oldValue = input.value;
|
||||
await userEvent.clear(input);
|
||||
|
||||
@@ -2954,7 +2954,7 @@ export const TransactionTable = forwardRef(
|
||||
amountPerTransaction,
|
||||
);
|
||||
|
||||
for (const amountIndex in amounts) {
|
||||
for (const [amountIndex] of amounts.entries()) {
|
||||
if (remainingCents === 0) break;
|
||||
|
||||
amounts[amountIndex] += 1;
|
||||
@@ -2967,9 +2967,12 @@ export const TransactionTable = forwardRef(
|
||||
tableNavigator.onEdit(null);
|
||||
}
|
||||
|
||||
for (const transactionIndex in emptyTransactions) {
|
||||
for (const [
|
||||
transactionIndex,
|
||||
transaction,
|
||||
] of emptyTransactions.entries()) {
|
||||
await onSave({
|
||||
...emptyTransactions[transactionIndex],
|
||||
...transaction,
|
||||
amount: amounts[transactionIndex],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [MatissJanis]
|
||||
---
|
||||
|
||||
Elevate `typescript/no-for-in-array` lint rule from warning to error, refactor affected code.
|
||||
Reference in New Issue
Block a user