-
Notifications
You must be signed in to change notification settings - Fork 660
noFloatingPromises
, typescript-eslint/no-floating-promises
#4168
Comments
this rule is critical for our projects, it prevents some very nasty situations from occurring, as floating promises can cause sync issues with our data model. |
noFloatingPromises
, no-floating-promisesnoFloatingPromises
, typescript-eslint/no-floating-promises
This would definitely help catch weird runtime errors. Looking forward to it’s support! |
Unfortunately the rule implementation requires information about types. |
I understand. This rule is actually so critical that I think I'm going to bring back eslint into our CI tests just for that rule alone. |
I actually think that this would be the answer, not something a linter should handle as it fundamentally can change the behaviour or the code. Don't really know if it's a linter's place to be reaching that far. Can close this if you like |
This rule is very important for us too and it is also 2-3x slower than any other rule we have enabled in eslint. I am happy to use a mix of eslint and rome as needed but a Rust implementation of this rule seems like it would have a significant impact to our lint times. |
Description
https://typescript-eslint.io/rules/no-floating-promises
important would be have the
ignoreVoid
enabled, as addingvoid
before a Promise can explicitly define that Promise as one that is not designed to beawaited
and blocking the function's execution.The text was updated successfully, but these errors were encountered: