-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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/jsx-sort-props breaks the code #1993
Labels
Comments
Does this only happen with babel-eslint? |
I think this is a duplicate of #1922. This rule doesn’t make an attempt of handling multiline props properly :/ |
In that case we should entirely disable the autofixer, pending making it behave properly. |
the same happens for me with |
tihonove
added a commit
to tihonove/eslint-plugin-react
that referenced
this issue
Oct 8, 2018
tihonove
added a commit
to tihonove/eslint-plugin-react
that referenced
this issue
Oct 10, 2018
ljharb
pushed a commit
to tihonove/eslint-plugin-react
that referenced
this issue
Oct 11, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
Babel-ESLint
Please show your full configuration:
I created a repo to reproduce the bug: https://github.com/davesnx/eslint-bug-react-sort-props
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
npx eslint . --fix
What did you expect to happen?
So theorically the rule should re-order my props, in the worst case scenario, not sort them. But actually is breaking them. It's a weird output:
It's actually trying to sort in a weird way, and it's not consistent.
Happens with a boolean props as well
The text was updated successfully, but these errors were encountered: