Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

JoshuaKGoldberg started this conversation in Technical Discussions
Discussion options

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/

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

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?

You must be logged in to vote
2 replies
@JoshuaKGoldberg
Comment options

I'll defer to @Josh-Cena on Docusaurus best practices 😄. But at the very least, making sure to include "thenable" at least once in all rules that relate to Promises is probably a good idea.

@JoshuaKGoldberg
Comment options

Ah, found the source of the rename: #192 (comment)

@mysticatea if you have the time, I'd be curious to get your input on whether this rename should happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation ("docs") that needs adding/updating
2 participants
Converted from issue

This discussion was converted from issue #5946 on November 17, 2022 15:53.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.