-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
sort-comp does not detect component declaration starting with return
#1076
Labels
Comments
Since |
In the second example, it is correctly being interpreted as a React component. In the first example, it is not detected as a React component. I will clarify the notes. |
aha, thank you. |
This was referenced Sep 22, 2018
This was referenced Oct 25, 2018
1 task
1 task
1 task
This was referenced Jan 8, 2019
1 task
1 task
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #174 a component is not detected if the declaration begins with
return
(Such as, in our case, where we're wrapping the component inside a HOC). Other react rules appear to be applied correctly to these cases, just notsort-comp
.Example code (does not show
sort-comp
warning):Example code (correctly shows
sort-comp
warning):As another note: The react lifecycle methods are out-of-order and yet generate no warning. Not sure why they are not, maybe that's another ticket.
The text was updated successfully, but these errors were encountered: