-
Notifications
You must be signed in to change notification settings - Fork 48.5k
#114 - stop requiring docblock for JSX transformer #418
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
Conversation
Incomplete. |
👍 |
@SanderSpies it seems like this PR is outdated and is causing some simple merge conflicts ( |
@@ -180,7 +180,7 @@ function visitReactTag(traverse, object, path, state) { | |||
visitReactTag.test = function(object, path, state) { | |||
// only run react when react @jsx namespace is specified in docblock | |||
var jsx = getDocblock(state).jsx; | |||
return object.type === Syntax.XJSElement && jsx && jsx.length; | |||
return object.type === Syntax.XJSElement && (jsx === undefined || (jsx && jsx.length && jsx === "React.DOM")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be simplified to return object.type === Syntax.XJSElement && (jsx == null || jsx === 'React.DOM');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I believe that from this comment of @jeffmo #364 (comment) he actually meant return object.type === Syntax.XJSElement && (!jsx || jsx === 'React.DOM');
What's the status here. Do we want to go forward with this change? |
This PR is 3 months old. I'm going to close it out. Feel free to re-open the issue. |
Revisiting #364 #114
(sorry for the extra pull request - used Github wrong the last time)