Skip to content

Commit 1163de6

Browse files
authored
microsoft#17542 enabling case sensitivty by default
This implements microsoft#17542 enable forceConsistentCasingInFileNames by default which fixes cross-platform compatability issues due to typescript not reporting different cases as an error in windows.
1 parent e1a4c27 commit 1163de6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/compiler/program.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,11 @@ namespace ts {
20492049
const file = filesByName.get(path);
20502050
// try to check if we've already seen this file but with a different casing in path
20512051
// NOTE: this only makes sense for case-insensitive file systems, and only on files which are not redirected
2052-
if (file && options.forceConsistentCasingInFileNames) {
2052+
2053+
//default to true
2054+
let forceCasing = options.forceConsistentCasingInFileNames || options.forceConsistentCasingInFileNames==null
2055+
2056+
if (file && forceCasing) {
20532057
let inputName = fileName;
20542058
const checkedName = file.fileName;
20552059
const isRedirect = toPath(checkedName) !== toPath(inputName);

0 commit comments

Comments
 (0)