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
react/function-component-definition: False positive on Redux mapStateToProps function #3057
Comments
This may be related to #3054. |
This is fixed in 7.25.1 |
Actually I spoke a touch too soon - it's no longer a violation but autofix now rewrites the arrow function to a regular function because I have |
Presumably that means it is still a violation, it's just that the autofix makes it not be one? |
That makes sense. I suspect the categorization changed a bit so that it now hits a different rule that has an autofix. |
This also gets incorrectly detected as a React component:
Version 7.28.0 and 7.29.4 |
👀 |
@ljharb I'd like to work on this. |
If I understand this correctly, the |
@TildaDares yes, this seems to be related to component detection. |
After upgrading to 7.25.0 I get a false positive from
react/function-component-definition
on the anonymous arrow function returned inside this:Since this is returning an object and not JSX, I don't think it should be detected as a React component.
The text was updated successfully, but these errors were encountered: