-
-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Labels
Description
Description
Very similar to no-useless-spread, but I don't think it make sense to add to no-useless-spread
Examples
// ❌
const set = new Set(iterator.toArray());
// ✅
const set = new Set(iterator);// ❌
for (const foo of iterator.toArray());
// ✅
for (const foo of iterator);More examples see no-useless-spread, replace ... to .toArray()
Proposed rule name
no-useless-iterator-to-array
Additional Info
No response
sindresorhus