-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add Roact dangling connection lint #533
base: main
Are you sure you want to change the base?
Add Roact dangling connection lint #533
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. Out of curiosity, and it doesn't have to, does this magically work with ReactHooks' useEffect? The one being passed through?
Yes, it will show the useEffect-specific error with |
To display the useEffect specific error it'll now look for the react/roact/hooks prefix per @matthargett's suggestion for a similar lint |
…t_dangling_connection
…ct_dangling_connection
Closes #383. This only errors when the file has
Roact
orReact
defined and when the connection is made within useEffect. In the future if we can reliably detect components vs regular functions we can also warn about dangling connections during render.