-
Notifications
You must be signed in to change notification settings - Fork 240
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
inconsistent case for "module" field in node bases #209
Comments
http://json.schemastore.org/tsconfig has an enum with uppercase Node16 in it, but also a pattern that spells that schema is linked from here https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#schema but contains a lot more patterns like this that technically allow using AlL tHE cAsES, why? |
I'm pretty sure TypeScript will lowercase the values, which makes any case acceptable because "why not?" - I'm not offended if someone changes them all to lowercase You're welcome to read up on the node16 changes in #197 |
I just noticed it due to a testcase failing while trying to update tsconfck to node18 (it expected lowercase like in the node14 base). Might end up refactoring the tests to use snapshots per node version and not use a public base to avoid this issue in the future. The inconsistencies between the official bases, official json schema and official documentation would be my answer to the "why not" question. Even the internal structures are not all the same (eg node vs node10). Isn't the goal of typescript to improve consistency and avoid problems like this? |
Not quite sure I get what you mean by the node vs node10? I don't think there was a node10 enum accepted by the tsconfig option for resolution but I've not fully kept on top of the tsconfig options these days But it seems pretty reasonable for a config to lowercase their values when they are user-inputted enums in a JSON file like that, but it's also cool if you disagree. A library throwing with the same input as typescript is kinda a bug on their side, but the case in this set of working tsconfigs isn't really something I'd think, so happy to have them all consistently lowercased 👍🏻 |
fix: inconsistent case for "module" field in node bases #209
According to https://www.typescriptlang.org/tsconfig#module lowercase
node16
is allowed, but node bases for node16 and up use upperfist Node16 here.PS. bases for versions older than 16 (12, 14) use
node16
, which is lowercase but also kind of surprising, given that they use something more recent than the node version they should be used with/for.The text was updated successfully, but these errors were encountered: