Skip to content

Commit

Permalink
[Refactor] use hasown instead of has
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 23, 2023
1 parent 78f50b8 commit ec6a8ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-module-utils": "^2.8.0",
"has": "^1.0.3",
"hasown": "^2.0.0",
"is-core-module": "^2.13.1",
"is-glob": "^4.0.3",
"minimatch": "^3.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-anonymous-default-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Duncan Beevers
*/

import has from 'has';
import hasOwn from 'hasown';
import values from 'object.values';
import fromEntries from 'object.fromentries';

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

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

module.exports = {
meta: {
Expand Down

0 comments on commit ec6a8ea

Please sign in to comment.