-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 some compilerOptions by default in Deno v2 #25162
Comments
There are 3 aspects I think are important to consider. In the table below,
|
I am in favor of enabling For For |
I would suggest turning on all TypeScript checking options to the max. The only thing holding me back from using Deno right now is that the TypeScript checking is so poorly configured. |
I opened #25465 for useUnknownInCatchVariables. For exactOptionalPropertyTypes and noUncheckedIndexedAccess I think it would be too breaking. For noImplicitOverride, I'm trying to figure out why TypeScript doesn't have this in the default |
Unfortunately I agree that |
@dsherret What's wrong with making a breaking change at a new major version which encourages writing safer code? That seems like exactly the right time to me… and users can always modify their compiler options to suppress these safer checks. The alternative currently appears to me as "we can never enable safer type checking by default because people have already written less safe code and we don't want them to feel the need to make changes as part of a major version upgrade." |
or, is there any easy way to let me enable configs via https://github.com/tsconfig/bases? |
I would also like to include |
It is possible to request to disable the options in compilerOptions for those who think the default settings are too strict in the release article, so I think it is better to make it as strict as possible. Especially for options that require type info that cannot be handled by deno_lint. |
I think |
It certainly seems so. This option need not be enabled by default, as it does not use any type information in particular. |
Apparently it has been decided that |
I have reconsidered that this issue should be closed after #11889 (comment) has been resolved. |
I would like to enable the following options by default in Deno v2:
"exactOptionalPropertyTypes"
for Typescript by default #11889"noUncheckedIndexedAccess"
"noImplicitOverride"
by default #11836"useUnknownInCatchVariables"
for TypeScript by default #11826Any thoughts?
The text was updated successfully, but these errors were encountered: