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;