-
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
use stc to improve deno lint #21946
Comments
stc is not being worked on anymore.
|
I also want no-floating-promises. It would be great if TypeScript would just add it microsoft/TypeScript#13376 (comment) |
Oh no. I was not aware. Would that mean that Deno would start running tsc during lint? |
The TypeScript issue would probably mean another compiler option where it points out unawaited promises. So it would be pointed out with |
Smart! |
@dsherret have you considered adding opt-in type-based linting, such as |
@KnorpelSenf weve considered it and it's possible, but we don't have bandwidth to work on it now. Contributions are welcome though :) |
There should be agreement on something so large before it's implemented. It will be a lot of work and last time it was discussed Ry was against it. |
Yes, for sure. A proposal would be a good contribution first. |
Btw, there is a list of type aware lints here: denoland/deno_lint#1138 |
Thanks for explaining! I currently also have too much on my list to work on this, but it's good to know that we can push in that direction if someone finds the time. |
deno lint
is awesome because it's super fast. However, there are things I really wish it could do, but it can't. The prime example for this isno-floating promises
.The reason why Deno isn't able to lint such things properly is because it doesn't run tsc. Thus, there's no way to infer the return type of
foo
, so the promise is floating without a warning. Usingtsc
is not really an option due to the performance cost.I suggest to use https://github.com/dudykr/stc which lets us do most of these things correctly. It isn't mature enough to replace tsc inside
deno check
IMO, but it could serve as the basis for much better linting as it would enabledeno lint
to access type information.What's your opinion on this?
The text was updated successfully, but these errors were encountered: