Skip to content
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

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
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 16, 2018

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

This comment has been minimized.

Copy link
Collaborator Author

@JoshuaKGoldberg JoshuaKGoldberg commented Nov 3, 2019

☠️ 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.