-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Fix lint warnings, style fixups #2566
Conversation
@@ -43,7 +43,7 @@ var ReactDOMTextComponent = function(props) { | |||
assign(ReactDOMTextComponent.prototype, { | |||
|
|||
/** | |||
* @param {ReactText} node | |||
* @param {ReactText} text |
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.
Our runtime typecheck transform fails here because it text
and node
don't match (more specifically, I think it will fail if you specify things in the docblock that aren't in the parameters, but not visa versa)
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); |
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.
My bad, sorry.
boom thanks :) |
079fe29
to
af1d6fd
Compare
@@ -101,7 +101,7 @@ function instantiateReactComponent(node, parentCompositeType) { | |||
} else { | |||
invariant( | |||
false, | |||
'Encountered invalid React node of type ' + typeof node | |||
'Encountered invalid React node of type undefined, symbol, or boolean.' |
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.
We have a lint rule internally about invariant
's second arg being a string literal. I'm not entirely sure why but I figured it's important enough to listen to.
Followup work for recent PRs
Followup work for recent PRs