From fb8e1e5e482a9f280c024f3dc10dc0e33ca5592a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 7 Apr 2018 13:34:34 -0700 Subject: [PATCH] [patch] use `resolve` instead of `builtin-modules` --- package.json | 4 ++-- src/core/importType.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 39768ca58..39308f938 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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": [ diff --git a/src/core/importType.js b/src/core/importType.js index e0941b46b..62519d175 100644 --- a/src/core/importType.js +++ b/src/core/importType.js @@ -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' @@ -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) {