Guess this is also a problem with the latest version of PrettyDiff.
Before:
<Map animate>
This is correct, since in JSX, boolean attributes of an element should omit a value if they are "true".
After Beautification:
<Map animate="animate">
This would be ok for HTML, but breaks JSX code, as "animate" is not a valid boolean. Unfortunately, this change is not even detectable by eslint, so code that ran perfectly before breaks unexpectedly now if you rely on "Beautify on save" as I do.
Setting animate={true} as a work-around doesn't help much, as this is considered as an error by eslint.
BTW: Is there a way to revert atom-beautify to an older version without the latest PrettyDiff updates? They are causing so much trouble that I would prefer the older one until these bugs have been fixed.
I am in the process of upgrading Pretty Diff to version 3 which will use an external parser. This issue is resolved in the parser, so I just need to publish an update to Pretty Diff.
Thanks. Really looking forward to this update, since it forces me to disable atom-beautify for now. The many cases it breaks JSX at the moment make it more "harmful" than "useful", at least in its current state. I'd love to see a way to revert to a previous version...
BTW: If you need volunteers testing JSX support for the next bigger update of atom-beautify, I'd be happy to support. I am using JSX nearly every day. I know this isn't trivial and appreciate your great work!
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I am in the process of upgrading Pretty Diff to version 3 which will use an external parser. This issue is resolved in the parser, so I just need to publish an update to Pretty Diff.