Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up`children is missing in props validation` #152
Comments
dcousens
added
the
question
label
Jun 9, 2015
This comment has been minimized.
This comment has been minimized.
|
The correct generic type is node. {
propTypes: {
children: React.PropTypes.node
}
}If it can only be a single child, it's |
This comment has been minimized.
This comment has been minimized.
|
I recently extracted the react-specific configs into their own shareable config. See: standard/eslint-config-standard#2 You guys should just change whatever options you want in eslint-config-standard-react. I've added you both as collaborators and npm owners. I don't use React, so I have no context or opinion about these issues. If you think there's likely to be controversy, open an issue / PR and wait a few days before merging. Same as we do on this repo.
|
This comment has been minimized.
This comment has been minimized.
|
Cool, thanks :D. |
This comment has been minimized.
This comment has been minimized.
|
Closing this now, please move it to https://github.com/feross/eslint-config-standard-react. |
dcousens commentedJun 9, 2015
When using React,
standardalways complains aboutthis.props.childrennot being defined inpropTypes, even though it is a complex type that is given by React it self.I personally don't even know what type it would even be, I know it is (kind of) array-like.
Is there a way we can avoid having to set up the
propTypevalidation for this property?