Feature: warn for returned promises that swallow errors #128
Open
Description
Hello,
It would be great if promises in this form triggered a warning:
function foo() {
return bar()
.then(...)
.catch((err) => {
console.error(err);
});
}
Rather than trying to prevent the user from swallowing errors entirely, the goal is to ensure errors are only swallowed intentionally:
function foo() {
return bar()
.then(...)
.catch((err) => { // eslint-disable-line promise/no-swallow-error-in-returned-promise
console.error(err);
});
}
Thanks for considering!