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
Prevent mistakes with Promise.resolve/reject()
#47
Comments
That sounds like a good addition, but you could generalize that to all Promise functions.
|
I'd be interested in contributing this. Would this be a new rule, perhaps named |
I'm working on this currently and hope to have a PR up later today 😄 |
@macklinu Will it include I've just had an issue with some code that passed 2 arguments to Will your PR cover it, or should I open a new ticket? |
Yep, 1 argument to |
Just shipped v3.7.0 - please update and report any issues you find with this new rule. Thanks! |
I've seen this mistake a couple of times: avajs/ava#1119 (comment) Nested parens are hard to read and sometimes you wrap the wrong thing. Would be useful to have a rule the reported when you tried using more than one argument with
Promise.resolve()
orPromise.reject()
.The text was updated successfully, but these errors were encountered: