-
Notifications
You must be signed in to change notification settings - Fork 142
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
Does not support properties that must be quoted #291
Comments
Hmm, actually ignore this... I must have been using an older version of sucrase. I just cloned this repo and added a test and it does appear to quote they property key per https://github.com/alangpierce/sucrase/blob/c77dcfe/src/transformers/JSXTransformer.ts#L101 |
Thanks for reporting, it looks like this actually is broken: Playground link Looks like the quoting happens when the property has an |
Ah, good call! I thought I was misremembering things for a second :). |
Took a shot at resolving this: #292 |
I was trying to use sucrase to transform a library that makes use of kebab-case props (e.g.
aria-hidden
). Sucrase produces invalid JavaScript when trying to transform that property.Example source:
Sucrase output:
The invalid output is the unquoted object property since
aria-hidden
is not a valid identifier.For reference, here is the Babel output:
The text was updated successfully, but these errors were encountered: