Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 388 Bytes

prefer-spread.md

File metadata and controls

17 lines (10 loc) · 388 Bytes

Prefer the spread operator over Array.from()

Enforces the use of the spread operator over Array.from(). This rule adds on to the built-in prefer-spread rule, which only flags uses of .apply(). Does not enforce for TypedArray.from();

Fail

Array.from(set).map(() => {});

Pass

[...set].map(() => {});