Skip to content

prop-types: 'children' is missing in props validation for ..component #126

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

Closed
andrevinsky opened this issue Jun 19, 2015 · 2 comments
Closed

Comments

@andrevinsky
Copy link

Isn't `children' a sort of ever-present property? Why warning then?

@AlexKVal
Copy link
Contributor

You are not the first who asks about it 😄
I am too: #54

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md#as-for-exceptions

@yannickcr
Copy link
Member

The rule is enforcing prop-types for all used props in your component (for documentation and debugging purpose), if you do not use the children props you will not get any warning.

You can still use the ignore option if you really do not want to set it for children.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants