From 869f96aa87c4f990f54e1eeccb0e3f7dbd66e6c2 Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Tue, 17 Sep 2019 15:33:43 +0900 Subject: [PATCH] fix problem when the base path was the root --- lib/cli-engine/config-array/ignore-pattern.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cli-engine/config-array/ignore-pattern.js b/lib/cli-engine/config-array/ignore-pattern.js index 3f28982a99c..b385aa923e9 100644 --- a/lib/cli-engine/config-array/ignore-pattern.js +++ b/lib/cli-engine/config-array/ignore-pattern.js @@ -38,8 +38,6 @@ const path = require("path"); const ignore = require("ignore"); const debug = require("debug")("eslint:ignore-pattern"); -// debug.enabled = true; - /** @typedef {ReturnType} Ignore */ //------------------------------------------------------------------------------ @@ -73,7 +71,7 @@ function getCommonAncestorPath(sourcePaths) { } } - return result; + return result || path.sep; } /**