eslint-plugin-promise icon indicating copy to clipboard operation
eslint-plugin-promise copied to clipboard

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

Open jp7837 opened this issue 5 years ago • 1 comments
trafficstars

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 avatar May 09 '20 15:05 jp7837

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

jp7837 avatar May 09 '20 19:05 jp7837