[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:
Matiss Janis Aboltins
2026-03-13 21:06:06 +00:00
committed by GitHub
co-authored by Claude github-actions[bot]
parent 541df52441
commit d6dcc30e44
4 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -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],
});
}
+6
View File
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [MatissJanis]
---
Elevate `typescript/no-for-in-array` lint rule from warning to error, refactor affected code.