fix: do not format callbacks with arguments as React hooks#5778
Merged
ikatyang merged 5 commits intoprettier:masterfrom Jan 21, 2019
SimenB:react-hook-break
Merged
fix: do not format callbacks with arguments as React hooks#5778ikatyang merged 5 commits intoprettier:masterfrom SimenB:react-hook-break
ikatyang merged 5 commits intoprettier:masterfrom
SimenB:react-hook-break
Conversation
2 tasks
suchipi
approved these changes
Jan 20, 2019
j-f1
approved these changes
Jan 20, 2019
Member
|
We just added a (I plan to release 1.16.1 tonight (UTC+8) if there's no more issue reported.) |
Contributor
Author
|
Sure, gave it a go! I'm heading to bed (2:30 here), feel free to edit it if I didn't do it correctly 🙂 |
ikatyang
approved these changes
Jan 21, 2019
Member
|
Thanks! |
Member
Contributor
Author
|
Thank you! Landed the upgrade in Jest as well - no changes from 1.15 🎉 |
|
I don't think presence of arguments is the best heuristic here. Why not detect non-method calls with a name matching |
Member
|
Maybe it should use the Hook style if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See discussion in #5608 (comment)
docs/directory)✨Try the playground for this PR✨