no-explicit-iterator-in-for-of Disallow explicit iterator calls in for-of loops A for-of loop obtains an iterable's iterator automatically. Instead, you SHOULD iterate over the iterable directly. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function sum(values: int32[]): int32 { let total: int32 = 0; for (const value of values.iterator()) { total += value; } return total; } Accepted function sum(values: int32[]): int32 { let total: int32 = 0; for (const value of values) { total += value; } return total; } Prior art - Clippy ยท explicititerloop language/linter/src/rules/style/noexplicititeratorinforof.rs:8