Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Mention strict-boolean-expressions in no-floating-promises #4117

Closed
JoshuaKGoldberg opened this issue Aug 16, 2018 · 1 comment
Closed

Mention strict-boolean-expressions in no-floating-promises #4117

JoshuaKGoldberg opened this issue Aug 16, 2018 · 1 comment

Comments

@JoshuaKGoldberg
Copy link
Contributor

Feature request

Is your feature request related to a problem? Please describe.

There are several issues related to the difference between no-floating-promises and strict-boolean-expressions. Examples: #3804 #3983 #4115

no-floating-promises intentionally does not check whether Promises are the conditionals in boolean expressions:

if (thingThatCreatesPromise()) { /* ... */ }

That is the realm of strict-boolean-expressions... which unfortunately is a rather strict rule, and many cannot turn it on.

Describe the solution you'd like

Until something more concrete is done to address the issue, we should note in the docs for no-floating-promises what it will or will not catch, and now strict-boolean-expressions solves the rest.

Describe alternatives you've considered

#3983 discusses the idea of either:

  • Making a separate rule for this specific case
  • Enhancing strict-boolean-expressions to be flexible enough for use on this specific case

Once either is done, we should also note it in the docs for no-floating-promises.

@JoshuaKGoldberg
Copy link
Contributor Author

☠️ TSLint's time has come! ☠️

TSLint is no longer accepting most feature requests per #4534. See typescript-eslint.io for the new, shiny way to lint your TypeScript code with ESLint. ✨

It was a pleasure open sourcing with you all!

@palantir palantir locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants