-
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
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!