-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUGGESTION: enable forceConsistentCasingInFileNames by default #17542
Comments
First off, really sorry you had a lot of frustration there. The option wasn't initially built into TypeScript which is why it's not the default. This would likely be a breaking change for users, so we'd need to discuss it. |
I forget the specific issue number but the |
I'm seeing the same issue as @aluanhaddad, but I'm not able to the find the issue referred to. If the issue has not actually been filed, I'd be happy to. |
@aluanhaddad I tried reproducing our issue in a minimal setup. At first, I could not, but after setting up configuration inheritance with |
FYI, issue filed: #17617 |
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.
it is now on by default. See microsoft#17542
it is now on by default. See microsoft#17542
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. (making change in right branch this time)
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. Making change in right repo & branch this time >_<
I've submitted a pull request for this by the way @RyanCavanaugh. Enabling this by default would help prevent people from running into cross-platform issues with casing. |
Note: Accepting PRs here only for changing what gets created in |
… configs (#39) *Issue number of the reported bug or feature request: microsoft#17542* **Describe your changes** Enabled `forceConsistentCasingInFileNames` in newly generated `tsconfig.json`s created by `tsc --init`. **Testing performed** The configuration option changed in the related tests. **Additional context** n/a Signed-off-by: Prakash Lalwani <[email protected]>
… configs (#39) (#33614) *Issue number of the reported bug or feature request: #17542* **Describe your changes** Enabled `forceConsistentCasingInFileNames` in newly generated `tsconfig.json`s created by `tsc --init`. **Testing performed** The configuration option changed in the related tests. **Additional context** n/a Signed-off-by: Prakash Lalwani <[email protected]>
Im interested if this died ad infinitum or if there is a plan having this implemented with a declared breaking change at some point? I just ran into the same problem using Deno. As Deno grows I could imagine there will be more and more complaints with the exact same problem. |
Our general policy is that the default values of commandline values never change unless there's a very compelling reason to; I don't think this would qualify. |
I think it would, as well as |
I'm confused, why do the official TS config docs say that TS defaults https://www.typescriptlang.org/tsconfig/#forceConsistentCasingInFileNames |
I just spent pretty much the whole day trying to get vscode debugger to stop on breakpoints set in typescript files.
The issue ended up being that one of the files in my project was importing a resource from a file using wrong file casing (and it just so happened to be that this file was the one I was trying to set breakpoints in) ...
import { foo } from "../bar/Awesomebaz"
With the target file actually named 'AwesomeBaz.ts'.
No warnings or execution problems occurred from this mistake ... Everything seemed to work except my debugging experience was myseriously broken in a very hard to understand way. It took a long time to discover the forceConsistentNaming compiler flag and get the idea to try turning it on which led immediately to the correct fix.
I think having this flag off is a bad default -- I would like to suggest turning it on by default instead. Or at least turn it on when strict: true ...
The text was updated successfully, but these errors were encountered: