sindresorhus/eslint-plugin-unicorn

False positive `array-from-async` in `unicorn/no-unnecessary-polyfills`

Closed

#2,270 opened on Feb 6, 2024

 (0 comments) (0 reactions) (0 assignees)JavaScript (468 forks)user submission
bughelp wanted

Repository metrics

Stars
 (5,022 stars)
PR merge metrics
 (Avg merge 1d 16h) (399 merged PRs in 30d)

Description

Code:

import arrayFromAsync from "array-from-async"; // Error: Use built-in instead

package.json:

{
  "engines": {
    "node": ">=18"
  }
}

Array.fromAsync is not present in any Node.js version, not even v21, so it should not trigger no-unnecessary-polyfills.

Contributor guide