eslint-plugin-promise
eslint-plugin-promise copied to clipboard
`promise/prefer-await-to-then` ignore constructor scope
trafficstars
Description
promise/prefer-await-to-then should not report errors if .then/.catch calls are inside constructor of some class
Because we can't have async constructor
You could always define an async function and call that function in the constructor without awaiting.
While I think this could be done with configuration, I think some projects may prefer to avoid such usages in case there is something wrong with using Promises at all in a constructor.