-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
props => props.borderRadius
should not trigger react/destructuring-assignment
#1637
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
Comments
Use destructuring: function ComponentA({ id }) { return <div id={id} /> } |
Separately, what considers |
aha, thank you :-) This is definitely a bug, as that rule should be using our component detection, and is not. |
Looks like it is now but it's not consulting the confidence level. These little components are being detected, but their confidence is 0. |
Although this test would require checking for confidence of 1 to pass |
If we change the detection helper itself to not fire for a confidence level of zero, do any tests fail? |
I'm seeing that |
That seems like it would be an improvement. |
props => <div id={props.id} />
should be considered to a stateless component,props => props.borderRadius
should notFor example:
BTW, it's better to provide an option to allow one line stateless component to use
props
directly.For example:
or
Otherwise it will be too complicated:
The text was updated successfully, but these errors were encountered: