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

prefer-await-to-then should flag promise.catch/finally as well #187

Open
jp7837 opened this issue May 9, 2020 · 1 comment
Open

prefer-await-to-then should flag promise.catch/finally as well #187

jp7837 opened this issue May 9, 2020 · 1 comment

Comments

@jp7837
Copy link
Contributor

jp7837 commented May 9, 2020

Description

For consistency, I feel that the prefer-await-to-then rule should also flag promise.catch and promise.finally so we can enforce async/await everywhere if desired.

Steps to Reproduce

  1. Run prefer-await-to-then on code with a Promise.prototype.catch invocation

Expected behavior: catch call is flagged

Actual behavior: rule does not report a problem

Versions

[Please fill this in if you are submitting a bug report]

  • Node version: 12.16.1
  • ESLint version: 6.7.2
  • eslint-plugin-promise version: 4.2.1

Additional Information

None, suggestion

@jp7837
Copy link
Contributor Author

jp7837 commented May 9, 2020

If we take this change, we could consider renaming the rule

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

No branches or pull requests

2 participants