node_modules icon indicating copy to clipboard operation
node_modules copied to clipboard

JSX transform should work with valueless attributes

Open mikesamuel opened this issue 7 years ago • 0 comments

Prior to this change, rewriting the below failed with an Error.

    <input checked />

https://github.com/facebook/jsx says

JSXAttribute :

    JSXAttributeName JSXAttributeInitializeropt

The JSXAttributeInitializer is optional.

Normal HTML parsing rules say that a valueless attribute specifies an attribute whose value is the same as its name.

Unresolved: Should we case-adjust the implied value per HTML rules.

I have not surveyed other plugins to see what they do.

mikesamuel avatar Jun 13 '18 17:06 mikesamuel