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

Fixer for eslint-plugin-promise breaks code functionality #1194

Closed
adrianmcli opened this issue Sep 7, 2018 · 3 comments
Closed

Fixer for eslint-plugin-promise breaks code functionality #1194

adrianmcli opened this issue Sep 7, 2018 · 3 comments

Comments

@adrianmcli
Copy link

What version of standard? v12.0.1

This problem stems from the eslint-plugin-promise project, and specifically the param-names rule.

Reproduction

Run the ESLint fixer on the following code:

new Promise((yes, no) => { yes("hello") })'

Expected behavior:

new Promise((resolve, reject) => { resolve("hello") })'

Actual behavior:

new Promise((resolve, reject) => { yes("hello") })'

Additional Information

Rather than trying to change people's code, I think it's better to remove the fixer rather than change variable names everywhere. I have submitted an issue to the eslint-plugin-promise repo: eslint-community/eslint-plugin-promise#145

If and when there is a resolution to that issue, we should take steps to update accordingly.

@adrianmcli
Copy link
Author

adrianmcli commented Sep 7, 2018

Update:

Now just waiting on v4.0.1 patch release as per: eslint-community/eslint-plugin-promise#146 (review)

@adrianmcli
Copy link
Author

v4.0.1 has been released and published, and this issue should now be fixed.

Github release link: https://github.com/xjamundx/eslint-plugin-promise/releases/tag/v4.0.1
NPM link: https://www.npmjs.com/package/eslint-plugin-promise

@lock lock bot locked as resolved and limited conversation to collaborators Dec 6, 2018
@feross
Copy link
Member

feross commented Aug 12, 2019

Thanks @adrianmcli

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants