From 23169d38992942f88227baeb81ce300e5eb1c6eb Mon Sep 17 00:00:00 2001 From: Barsukov Nikita Date: Fri, 11 Nov 2022 10:16:14 +0300 Subject: [PATCH] fix(eslint-plugin): broken `no-deep-imports` on `Windows`-OS --- projects/eslint-plugin/no-deep-imports.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/eslint-plugin/no-deep-imports.js b/projects/eslint-plugin/no-deep-imports.js index 242ee10c613c..411d31246d29 100644 --- a/projects/eslint-plugin/no-deep-imports.js +++ b/projects/eslint-plugin/no-deep-imports.js @@ -67,10 +67,9 @@ module.exports = { }; const isInsideTheSameEntryPoint = source => { - const filePath = path.relative( - context.getCwd().replace(/\\+/g, '/'), - context.getFilename().replace(/\\+/g, '/'), - ); + const filePath = path + .relative(context.getCwd(), context.getFilename()) + .replace(/\\+/g, '/'); const [currentFileProjectName] = (currentProject && filePath.match(new RegExp(currentProject, 'g'))) || [];