Skip to content
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

Merged
merged 2 commits into from Jun 25, 2019

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented May 31, 2018

What is the purpose of this pull request?

  • Fixed that no-return-wrap does not work if type is not "ExpressionStatement".
    (ex. "ReturnStatement" argument,"CallExpression" argument)
  • Fixed that no-return-wrap does not work if multiple "ExpressionStatement" exists in the ancestor of "ReturnStatement".
  • Documentation update
  • Bug fix
  • New rule
  • Changes an existing rule
  • Add autofixing to a rule
  • Other, please explain:

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

@alexander-akait
Copy link

/cc @ota-meshi can you rebase
/cc @xjamundx

@xjamundx
Copy link
Contributor

xjamundx commented Apr 23, 2019

I'm so bad at maintaining this module. I'm basically fine with this change if we can rebase it.

@ota-meshi
Copy link
Member Author

Hello!
I rebased my branch.

@ota-meshi
Copy link
Member Author

Please wait a minute.
#150 may be related. I will add test code.

@ota-meshi
Copy link
Member Author

I added testcase of #150, and added close comment to the PR comment.

@alexander-akait
Copy link

Thanks
/cc @xjamundx

@alexander-akait
Copy link

/cc @xjamundx Friendly ping again

@xjamundx
Copy link
Contributor

k looking

@alexander-akait
Copy link

/cc @xjamundx can we merge and release new version?

@xjamundx
Copy link
Contributor

I'll be honest, I don't really understand when/why this would be useful, but the code looks fine and I will release.

@xjamundx xjamundx merged commit 3f2c61d into eslint-community:master Jun 25, 2019
@xjamundx
Copy link
Contributor

+ eslint-plugin-promise@4.2.1

@ota-meshi ota-meshi deleted the fix/no-return-wrap branch June 26, 2019 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-return-wrap doesn't work
3 participants