From 1a42f3d0e9c646f45a45ab0b10b5903a39617326 Mon Sep 17 00:00:00 2001 From: Armano Date: Mon, 6 Jan 2020 06:51:12 +0100 Subject: [PATCH] fix(typescript-estree): correct persisted parse for windows (#1406) --- packages/typescript-estree/src/create-program/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index b828478073e..8aceb204c47 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -32,7 +32,7 @@ const correctPathCasing = useCaseSensitiveFileNames function getCanonicalFileName(filePath: string): CanonicalPath { let normalized = path.normalize(filePath); - if (normalized.endsWith('/')) { + if (normalized.endsWith(path.sep)) { normalized = normalized.substr(0, normalized.length - 1); } return correctPathCasing(normalized) as CanonicalPath;