Skip to content

Commit

Permalink
[resolvers/webpack] [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 66cb10f commit 2c281d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const fs = require('fs');
const isCore = require('is-core-module');
const resolve = require('resolve/sync');
const semver = require('semver');
const has = require('has');
const hasOwn = require('hasown');
const isRegex = require('is-regex');

const log = require('debug')('eslint-plugin-import:resolver:webpack');
Expand Down Expand Up @@ -382,7 +382,7 @@ function findExternal(source, externals, context, resolveSync) {

// else, vanilla object
for (const key in externals) {
if (!has(externals, key)) { continue; }
if (!hasOwn(externals, key)) { continue; }
if (source === key) { return true; }
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion resolvers/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"debug": "^3.2.7",
"enhanced-resolve": "^0.9.1",
"find-root": "^1.1.0",
"has": "^1.0.3",
"hasown": "^2.0.0",
"interpret": "^1.4.0",
"is-core-module": "^2.13.0",
"is-regex": "^1.1.4",
Expand Down

0 comments on commit 2c281d1

Please sign in to comment.