Skip to content

Commit f0b4f3e

Browse files
authored
Merge pull request #1069 from ljharb/resolve
[patch] use `resolve` instead of `builtin-modules`
2 parents d8077c8 + fb8e1e5 commit f0b4f3e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
"eslint": "2.x - 4.x"
8080
},
8181
"dependencies": {
82-
"builtin-modules": "^1.1.1",
8382
"contains-path": "^0.1.0",
8483
"debug": "^2.6.8",
8584
"doctrine": "1.5.0",
@@ -88,7 +87,8 @@
8887
"has": "^1.0.1",
8988
"lodash": "^4.17.4",
9089
"minimatch": "^3.0.3",
91-
"read-pkg-up": "^2.0.0"
90+
"read-pkg-up": "^2.0.0",
91+
"resolve": "^1.6.0"
9292
},
9393
"nyc": {
9494
"require": [

src/core/importType.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import cond from 'lodash/cond'
2-
import builtinModules from 'builtin-modules'
2+
import coreModules from 'resolve/lib/core'
33
import { join } from 'path'
44

55
import resolve from 'eslint-module-utils/resolve'
@@ -24,7 +24,7 @@ export function isAbsolute(name) {
2424
export function isBuiltIn(name, settings) {
2525
const base = baseModule(name)
2626
const extras = (settings && settings['import/core-modules']) || []
27-
return builtinModules.indexOf(base) !== -1 || extras.indexOf(base) > -1
27+
return coreModules[base] || extras.indexOf(base) > -1
2828
}
2929

3030
function isExternalPath(path, name, settings) {

0 commit comments

Comments
 (0)