Skip to content

Commit 1a4c76f

Browse files
authoredMar 22, 2025··
no-unnecessary-polyfills: Fix browserslist field name (#2603)
1 parent dbe2bb2 commit 1a4c76f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎docs/rules/no-unnecessary-polyfills.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Type: `object`
5353

5454
Type: `string | string[] | object`
5555

56-
Specify the target versions, which could be a Browserlist query or a targets object. See the [core-js-compat `targets` option](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js-compat#targets-option) for more info.
56+
Specify the target versions, which could be a Browserslist query or a targets object. See the [core-js-compat `targets` option](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js-compat#targets-option) for more info.
5757

58-
If the option is not specified, the target versions are defined using the [`browserlist`](https://browsersl.ist) field in package.json, or as a last resort, the `engines` field in package.json.
58+
If the option is not specified, the target versions are defined using the [`browserslist`](https://browsersl.ist) field in package.json, or as a last resort, the `engines` field in package.json.
5959

6060
```js
6161
"unicorn/no-unnecessary-polyfills": [

‎rules/no-unnecessary-polyfills.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ function getTargets(options, dirname) {
6868
return;
6969
}
7070

71-
const {browserlist, engines} = packageResult.packageJson;
72-
return browserlist ?? engines;
71+
const {browserslist, engines} = packageResult.packageJson;
72+
return browserslist ?? engines;
7373
}
7474

7575
function create(context) {

0 commit comments

Comments
 (0)
Please sign in to comment.