-
Notifications
You must be signed in to change notification settings - Fork 887
[Rule Request] no-promise-in-boolean-expressions #3804
Comments
Specifically which parts? Maybe the rule could have options added that would allow it to be flexible enough for you? |
+1 to the strictness of that rule. We have a lot of code that looks like this:
If this logic was put into that rule, I'd want a rule like |
I did find something like this elsewhere: https://github.com/wwwouter/tslint-contrib but unfortunately it doesn't support blacklisting additional classes like |
Looks like discussion continued a bit deeper in #3983 for a very similar idea. Closing this issue as duplicate; let's continue talking there. |
Right, this is a common bug. |
We're working with a lot of async/await in our backend code, and the most frequent source of mistake I found in our code base has this shape:
whereas it should be
I'm aware of the
strict-boolean-expressions
rule, but its ruleset is too strict for our code. So I'm suggesting to create a softer version which allows anything but promises in boolean expressions.The text was updated successfully, but these errors were encountered: