-
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
--config should not apply to deps #7701
Comments
I don't think we want to support this. The complexity versus value is too great, even if it was achievable. In the specific example you've given, those items are much better suited for linting purposes. Ultimately, in fact, supporting
This would imply that @ry, @bartlomieju thoughts? |
@kitsonk What about other options? What happens when 4.1 and I want this You recommended me to use the Should any project's configs be applied to others whose code we can not control(deps)? That said I absolutely love the idea of getting rid of configurations. I actually hate configs/options. However, I do believe that if this is done, Deno should adopt the strictest options possible to provide the best type-safety that TS has to offer because otherwise, Deno would only be causing me to lose benefits that TS can give. |
The TypeScript core team specifically do not recommend enabling My feeling is we follow |
@kitsonk IMO you can indeed choose to avoid enabling options so long as you have some way to allow users to enable that option to have type safety? If you remove the --configs as you mentioned above then that becomes impossible for me to enable making me lose TS safety. And with the current --configs, I still can't use it because if I do enable it'll break 90% of modules out there so Deno itself becomes pretty bad to use for me. If I want more type safety, I can't use Deno. That's not a good thing. |
The example you current give has nothing to do with type safety. They are stylistic improvements, ones which The benefits of an opinionated set of options means everyone know how they can write TypeScript code for Deno, and how to validate, instead of having to try to figure out what the maximum set of options that need to be set are that don't conflict. It is a huge and growing problem with the wider TypeScript eco-system, something I think we need to make the responsible choice and not add to. |
With all due respect, I do know what it means. I have already applied the I did not say that I lose all the benefits of TS if you don't allow a single option. But I am losing some TS benefits in my project without this option. If I were to use Deno, I would not be able to get faster performance, fewer rate limits, and bandwidth being wasted as well as preventing bugs in runtime which cause hours of debugging because you have to go line by line since TS says everything is good! But all that is beside the point. This isn't about 1 or 2 specific options but the general decision of how As I said above, I 100% support the opinionated set kit. I love less configs. However, I don't think the opinionated set should be limited to The main issue is that tsconfigs -configs are applied to every dep, to which the possible solutions are:
|
Issue #7732 is opened about removing Again, to be clear, as for applying different configs to different sets of TypeScript files, I am opposed to it. |
--configs tsconfig.json
should not apply to dependencies only my code. I can't control other libraries code and it makes it near impossible to rely on every dependency using the same configurations as my personal choicesI can no longer use my project because a dependency of dependency does not comply with these settings. For now, I just removed these options but the point I am hoping to convey is that
--configs
is not really useable in the real world. Now, these are just simple options that might not break most projects but what happens when 4.1 becomes enabled and I add thenoUncheckedIndexedAccess
compiler option to my tsconfig? How many modules will become unusable for me?Dependency modules should not be compiled using the custom compiler options.
Relevant Issue: #5460
Alternative:
--no-check
I really don't think this option is a good option to solve this as this would remove all the benefits of using TS and tsconfig in the first place since it also disables checking of my code.The text was updated successfully, but these errors were encountered: