Open
Description
Hello! If the environment doesn't support <feature>
, when I import from core-js/actual/<feature>
or core-js/full/<feature>
, no-unnecessary-polyfills
rule is incorrectly triggered, but if I import it from es
or stable
, it is not.
Example:
// Reported - but the environment doesn't support `Array.prototype.toSpliced`:
import 'core-js/actual/array/to-spliced';
import 'core-js/full/array/to-spliced';
// Not reported as expected:
import 'core-js/es/array/to-spliced';
import 'core-js/stable/array/to-spliced';
Full reproduction: https://stackblitz.com/edit/vitejs-vite-zrgjkh?file=src%2Fmain.js
pnpm test