Skip to content

Commit

Permalink
fix(eslint-plugin): broken no-deep-imports on Windows-OS
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Nov 11, 2022
1 parent c93ae27 commit 23169d3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions projects/eslint-plugin/no-deep-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) || [];
Expand Down

0 comments on commit 23169d3

Please sign in to comment.