Skip to content

Commit

Permalink
[patch] use resolve instead of builtin-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 7, 2018
1 parent d8077c8 commit fb8e1e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"eslint": "2.x - 4.x"
},
"dependencies": {
"builtin-modules": "^1.1.1",
"contains-path": "^0.1.0",
"debug": "^2.6.8",
"doctrine": "1.5.0",
Expand All @@ -88,7 +87,8 @@
"has": "^1.0.1",
"lodash": "^4.17.4",
"minimatch": "^3.0.3",
"read-pkg-up": "^2.0.0"
"read-pkg-up": "^2.0.0",
"resolve": "^1.6.0"
},
"nyc": {
"require": [
Expand Down
4 changes: 2 additions & 2 deletions src/core/importType.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cond from 'lodash/cond'
import builtinModules from 'builtin-modules'
import coreModules from 'resolve/lib/core'
import { join } from 'path'

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

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

0 comments on commit fb8e1e5

Please sign in to comment.