-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.1.0 - Each then() should return a value or throw #213
Comments
Anyone care to comment? Is the above code incorrect? If so, what would be the best procedure for handling this so the eslint-plugin-promise doesn't complain? |
I believe this is a bug in plugin. I get this same error if return/throw contains an expression, just like you have inside your error constructor ( |
I can try to take a look at this this week. |
I'm still seeing this issue in ver
which is an argument to a function call that returns a Promise at the beginning of a Versions
eslint-plugin-promise v4.3.1 does not have this issue. |
This is a bug 🐛 (still present in v.6.0.0) As @Tol1 , if you remove the expression inside as a temp work around: const errMsg = json?.error_description || 'Error';
throw new Error(errMsg); |
🎉 This issue has been resolved in version 6.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Updated deps this morning. In particular, eslint-plugin-promise from v4.3.1 to v5.1.0 (did you forget to make a tag for this release?) and getting the following error:
The code in question looks like this:
I am not seeing the issue here. There is both a
return
and athrow
involved.Expected behavior: No error here
Actual behavior: issues an error
Versions
The text was updated successfully, but these errors were encountered: