-
Notifications
You must be signed in to change notification settings - Fork 343
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
XJS -> JSX #163
XJS -> JSX #163
Conversation
esprima-fb has to be bumped too (tests still pass). |
For backwards compatibility, can we keep the old case "XJSElement":
case "JSXElement":
var openingLines = path.call(print, "openingElement");
... |
Yeah, I wanted to ask you about that and forgot... will update. |
Although, is this actually necessary if ast-types cannot produce |
Yeah, older versions of |
Maybe I'm missing something, but wouldn't recast not be able to handle "older" ASTs because the new version of ast-types doesn't support Or do some parts of recast work without ast-types and directly on the AST? |
Do you know if parentheses are still needed around multi-line JSX |
You mean for
? I would believe so. If there is a line break after the |
parens shouldn't be needed, since tag balancing trumps ASI... for example, jsx cli (react-tools) converts this: return <div>
there are
<b>multiple</b> lines
here
</div>; into this: return React.createElement("div", null,
"there are",
React.createElement("b", null, "multiple"), " lines" + ' ' +
"here"
); |
Have parens be ever needed for
? |
Depends on benjamn/ast-types#93. I did a simple search/replace here as well and ran
npm test
with the updated ast-types version.