eslint-plugin

@masknet/array/prefer-from

Prefer Array.from(...) over new Array(...)

Rule Details

:x: Incorrect

declare const elements: string[][]
new Array(elements)

:white_check_mark: Correct

declare const elements: string[][]
Array.from(elements)

Attributes