-
-
Notifications
You must be signed in to change notification settings - Fork 401
Add no-thenable
rule
#1616
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
Add no-thenable
rule
#1616
Conversation
docs/rules/no-thenable.md
Outdated
|
||
✅ *This rule is part of the [recommended](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config) config.* | ||
|
||
If an object is defined as "thenable", once it's accidentally used in an await expression, it may cause problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should describe what kind of problem.
docs/rules/no-thenable.md
Outdated
|
||
✅ *This rule is part of the [recommended](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config) config.* | ||
|
||
If an object is defined as "thenable", once it's accidentally used in an await expression, it may cause problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any docs to link to about this for context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any link for this.
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
I've added some example to show the problems. |
Fixes #1596