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

Warn on new Promise.resolve() #75

Closed
alexilyaev opened this issue Jan 30, 2018 · 6 comments
Closed

Warn on new Promise.resolve() #75

alexilyaev opened this issue Jan 30, 2018 · 6 comments
Assignees
Labels

Comments

@alexilyaev
Copy link

Seeing this from time to time, would be nice to warn about the unnecessary new in:

new Promise.resolve()
new Promise.reject()
@xjamundx
Copy link
Contributor

xjamundx commented Jan 30, 2018 via email

@macklinu
Copy link
Contributor

macklinu commented Feb 5, 2018

Would this be an addition to the avoid-new rule, or would this be a new rule (something like no-new-statics)?

@macklinu
Copy link
Contributor

macklinu commented Feb 5, 2018

I will open a PR with an implementation for further discussion. 👍

macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 5, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 5, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 7, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 7, 2018
@macklinu macklinu added the has pr label Feb 7, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 8, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 10, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 10, 2018
@macklinu macklinu self-assigned this Feb 10, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 11, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 12, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 23, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 23, 2018
macklinu added a commit to macklinu/eslint-plugin-promise that referenced this issue Feb 25, 2018
macklinu added a commit that referenced this issue Feb 25, 2018
@macklinu
Copy link
Contributor

This will land in an upcoming v3.7.0 release. 👍

@alexilyaev
Copy link
Author

Great, thanks!

@macklinu
Copy link
Contributor

macklinu commented Mar 8, 2018

Just shipped v3.7.0 - please update and report any issues you find with this new rule. Thanks!

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

No branches or pull requests

3 participants