Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Docs/Naming: Standardize on "Promise" or "Thenable" in rule names #5946

Closed
2 tasks done
JoshuaKGoldberg opened this issue Nov 8, 2022 · 1 comment
Closed
2 tasks done
Labels
documentation Documentation ("docs") that needs adding/updating triage Waiting for maintainers to take a look

Comments

@JoshuaKGoldberg
Copy link
Member

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

One rule directly refers to Thenables:

Other rules refer to Promises:

IMO it's confusing how only one rule refers to Thenables... even though that's technically the correct term.

Thoughts: should we rename some rule(s) for clarity vs. discoverability? I haven't re-looked deeply into the rules, but if no-floating-promises & no-misused-promises actually work on all Thenables (and not just Promises) then maybe we should call them all thenables? Or maybe most users don't know what a Thenable is, and we should always say Promises?

Affected URL(s)

https://typescript-eslint.io/rules/

@JoshuaKGoldberg JoshuaKGoldberg added triage Waiting for maintainers to take a look documentation Documentation ("docs") that needs adding/updating labels Nov 8, 2022
@bradzacher
Copy link
Member

IIRC the name await-thenable came from the tslint rule - which was written in a time back when using bluebird instead of promises was super duper common, so you needed to support "thenable" things instead of just "promises".

now-a-days yeah promises all the way.
It's probably a good idea to add this.

I wonder if we can also handle this from a documentation side of things - maybe adding keywords to rule metadata so that you can search for themes instead of relying solely on rule names?

@typescript-eslint typescript-eslint locked and limited conversation to collaborators Nov 17, 2022
@JoshuaKGoldberg JoshuaKGoldberg converted this issue into discussion #6012 Nov 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
documentation Documentation ("docs") that needs adding/updating triage Waiting for maintainers to take a look
Projects
None yet
Development

No branches or pull requests

2 participants