Skip to content

Commit

Permalink
[Refactor] importType: use is-core-module instead of `resolve/lib…
Browse files Browse the repository at this point in the history
…/core`
  • Loading branch information
JLHwung authored and ljharb committed Oct 19, 2020
1 parent a00727e commit 13aa29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -105,6 +105,7 @@
"eslint-import-resolver-node": "^0.3.4",
"eslint-module-utils": "^2.6.0",
"has": "^1.0.3",
"is-core-module": "^1.0.2",
"minimatch": "^3.0.4",
"object.values": "^1.1.1",
"read-pkg-up": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/core/importType.js
@@ -1,4 +1,4 @@
import coreModules from 'resolve/lib/core'
import isCoreModule from 'is-core-module'

import resolve from 'eslint-module-utils/resolve'

Expand All @@ -20,7 +20,7 @@ export function isBuiltIn(name, settings, path) {
if (path || !name) return false
const base = baseModule(name)
const extras = (settings && settings['import/core-modules']) || []
return coreModules[base] || extras.indexOf(base) > -1
return isCoreModule(base) || extras.indexOf(base) > -1
}

function isExternalPath(path, name, settings) {
Expand Down

0 comments on commit 13aa29c

Please sign in to comment.