prefer-for-of-over-for-each Prefer for-of over sequential forEach callbacks A forEach callback introduces a function boundary for ordinary sequential iteration. Instead, you SHOULD use a for-of loop when the callback boundary is unnecessary. A return inside the callback exits only that callback and requires manual restructuring. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported function copy(values: int32[], output: int32[]): void { values.forEach((value) => { output.push(value); }); } Accepted function copy(values: int32[], output: int32[]): void { for (const value of values) { output.push(value); } } Prior art - eslint-plugin-unicorn ยท no-for-each language/linter/src/rules/style/preferforofoverforeach.rs:8