I'm using ESLint and I get this error: Each then() should return a value or throw promise/always-return
Code:
return somePromise.then(result => {
console.log(result);
}).catch(error => {
console.error(error);
});
Why should I return from this promise? There is clearly no need for it because I only wanted to print the result in the log and that's it. This rule seems wrong to apply in all cases. I'm writing a Firebase database trigger which I believe is only interested in knowing whether the promise has resolved or not.