Skip to content

Commit ec6a8ea

Browse files
committed
[Refactor] use hasown instead of has
1 parent 78f50b8 commit ec6a8ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"doctrine": "^2.1.0",
112112
"eslint-import-resolver-node": "^0.3.9",
113113
"eslint-module-utils": "^2.8.0",
114-
"has": "^1.0.3",
114+
"hasown": "^2.0.0",
115115
"is-core-module": "^2.13.1",
116116
"is-glob": "^4.0.3",
117117
"minimatch": "^3.1.2",

src/rules/no-anonymous-default-export.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Duncan Beevers
44
*/
55

6-
import has from 'has';
6+
import hasOwn from 'hasown';
77
import values from 'object.values';
88
import fromEntries from 'object.fromentries';
99

@@ -65,7 +65,7 @@ const schemaProperties = fromEntries(values(defs).map((def) => [def.option, {
6565
type: 'boolean',
6666
}]));
6767

68-
const defaults = fromEntries(values(defs).map((def) => [def.option, has(def, 'default') ? def.default : false]));
68+
const defaults = fromEntries(values(defs).map((def) => [def.option, hasOwn(def, 'default') ? def.default : false]));
6969

7070
module.exports = {
7171
meta: {

0 commit comments

Comments
 (0)