-
-
Notifications
You must be signed in to change notification settings - Fork 933
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
Fix autofix for variable name matching property name #4662
Comments
@guoyunhe Thanks for the report and for using the template. I've transferred your issue because the problem is in stylelint itself, rather than the VS Code extension. The underlying problem is likely with the parser stylelint uses to support CSS-in-JS. I've added this issue to #4574, which is a growing list of the problems with the syntax that we need help to fix. Please consider contributing to the parser if you have time. |
The parser is not the issue. The parser interprets the expression appropriately and does not turn it into lowercase when stringifying the parsed expression. The issue is with the |
This appears to come down to the exact same issue described here: #5185 (comment) This is probably a duplicate of that issue, I don't believe it's related to the "variable name matching property name" as indicated in the title. Using another property name results in the same issue: return <div style={{ minWidth: maxWidth + 10 }}>{children}</div> |
Closing as the We'll also be deprecating our forked CSS-in-JS package, in favour of leaner custom syntaxes. Please consider writing a custom syntax specific to the CSS-in-JS library in this issue and fixing the bug there. |
In React JSX/TSX files, the stylelint plugin try to auto fix variable casing in the
style
property. But this will cause the code not working.e.g.
Yes
0.84.0
13.2.0
It is related to JSX
The code is valid and should not be touched.
The code is changed,
maxWidth
-->maxwidth
, and thus not working anymore.The text was updated successfully, but these errors were encountered: