sindresorhus/eslint-plugin-unicorn

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

Chiusa

#2270 aperta il 6 feb 2024

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (468 fork)user submission
bughelp wanted

Metriche repository

Star
 (5022 stelle)
Metriche merge PR
 (Merge medio 4h 30m) (26 PR mergiate in 30 g)

Descrizione

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.

Guida contributor