外觀
強制使用展開運算符 (...),而非過時的模式。
...
使用展開運算符更簡潔易讀。
此規則的不正確程式碼範例
const foo = Array.from(set); const foo = Array.from(new Set([1, 2]));
此規則的正確程式碼範例
[...set].map(() => {}); Array.from(...argumentsArray);