From 54b242dcd74e16ad6bf4e7f0ab5c8292479e6805 Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Mon, 24 Jan 2022 16:03:32 +0100 Subject: [PATCH] Fix problem with `code-import-patterns` on Windows --- build/lib/eslint/code-import-patterns.js | 2 +- build/lib/eslint/code-import-patterns.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/eslint/code-import-patterns.js b/build/lib/eslint/code-import-patterns.js index 057cf8e9bc6..679a2272763 100644 --- a/build/lib/eslint/code-import-patterns.js +++ b/build/lib/eslint/code-import-patterns.js @@ -149,7 +149,7 @@ module.exports = new class { // resolve relative paths if (importPath[0] === '.') { const relativeFilename = getRelativeFilename(context); - importPath = path.join(path.dirname(relativeFilename), importPath); + importPath = path.posix.join(path.posix.dirname(relativeFilename), importPath); if (/^src\/vs\//.test(importPath)) { // resolve using AMD base url importPath = importPath.substring('src/'.length); diff --git a/build/lib/eslint/code-import-patterns.ts b/build/lib/eslint/code-import-patterns.ts index 523aaa1051c..7de55c832fd 100644 --- a/build/lib/eslint/code-import-patterns.ts +++ b/build/lib/eslint/code-import-patterns.ts @@ -187,7 +187,7 @@ export = new class implements eslint.Rule.RuleModule { // resolve relative paths if (importPath[0] === '.') { const relativeFilename = getRelativeFilename(context); - importPath = path.join(path.dirname(relativeFilename), importPath); + importPath = path.posix.join(path.posix.dirname(relativeFilename), importPath); if (/^src\/vs\//.test(importPath)) { // resolve using AMD base url importPath = importPath.substring('src/'.length);