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
Fixed that no-return-wrap
does not work if type is not "ExpressionStatement".
#136
Fixed that no-return-wrap
does not work if type is not "ExpressionStatement".
#136
Conversation
/cc @ota-meshi can you rebase |
I'm so bad at maintaining this module. I'm basically fine with this change if we can rebase it. |
bacfed5
to
d8b9206
Compare
Hello! |
Please wait a minute. |
I added testcase of #150, and added |
Thanks |
/cc @xjamundx Friendly ping again |
k looking |
/cc @xjamundx can we merge and release new version? |
I'll be honest, I don't really understand when/why this would be useful, but the code looks fine and I will release. |
|
What is the purpose of this pull request?
no-return-wrap
does not work if type is not "ExpressionStatement".(ex. "ReturnStatement" argument,"CallExpression" argument)
no-return-wrap
does not work if multiple "ExpressionStatement" exists in the ancestor of "ReturnStatement".What changes did you make? (Give an overview)
I changed to search for the ancestor of "FunctionExpression" closest to "ReturnStatement" and to check if the parent node of that "FunctionExpression" is
Promise
.Close #150