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
function-component-definition breaks code #2765
Comments
This seems like two issues - one is that the autofix is incorrect, and produces invalid syntax. The other is that since this is a lowercase method of an object literal, we shouldn't detect it as a component. |
I'll take a look |
(to clarify; the invalid autofix is a much more urgent issue) |
Great, thanks! Question: does it generally ignore lowercase identifiers now or is that a separate bug? |
Yes, custom components must be PascalCased as far as I know. If there's a case you think is a bug, please do file an issue :-) |
When I auto-fix function-component-definition, it decides that the below is a function component (it's not really) and that it should use arrow notation:
It proceeds to auto-fix like this:
which is invalid. It should have changed it to
serialize: el => {
insteadAnother option is that the rule ignores object function notation.
The text was updated successfully, but these errors were encountered: