pure-component: support Type Annotations & Class Properties#84
Merged
keyz merged 2 commits intoreactjs:masterfrom Nov 7, 2016
Merged
pure-component: support Type Annotations & Class Properties#84keyz merged 2 commits intoreactjs:masterfrom
keyz merged 2 commits intoreactjs:masterfrom
Conversation
Contributor
Author
|
Oh, this completely errors when running on my own project.. I guess the default parser of jscodeshift is Babylon, but not in the tests? Edit: the Babylon errors might just be an existing issue, actually (#78). |
ba385d4 to
e174dc3
Compare
Member
|
@keyanzhang can you take a look at this one? :) |
Member
|
Thanks @danharper, the code looks solid. Note: I manually restarted the build on travis to double check; all the errors are from #88 and not |
Contributor
Author
|
👍 thanks |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I was going to split this into a few PRs, but they're kinda related.
Firstly, it now treats any Component with a
ClassPropertywhich isn'tpropsas being impure.Secondly, it retains any static
ClassPropertys.Finally, it retains
propstype annotations when transforming to a function.I haven't used jscodeshift before, so happy to make any changes if there's a cleaner way of accomplishing it :)