{"action":"created","issue":{"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/557","repository_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react","labels_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/557/labels{/name}","comments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/557/comments","events_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/557/events","html_url":"https://github.com/yannickcr/eslint-plugin-react/issues/557","id":150077223,"number":557,"title":"missing props validation -validation only for exported functions?","user":{"login":"villesau","id":2647016,"avatar_url":"https://avatars.githubusercontent.com/u/2647016?v=3","gravatar_id":"","url":"https://api.github.com/users/villesau","html_url":"https://github.com/villesau","followers_url":"https://api.github.com/users/villesau/followers","following_url":"https://api.github.com/users/villesau/following{/other_user}","gists_url":"https://api.github.com/users/villesau/gists{/gist_id}","starred_url":"https://api.github.com/users/villesau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villesau/subscriptions","organizations_url":"https://api.github.com/users/villesau/orgs","repos_url":"https://api.github.com/users/villesau/repos","events_url":"https://api.github.com/users/villesau/events{/privacy}","received_events_url":"https://api.github.com/users/villesau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-21T13:38:44Z","updated_at":"2016-05-23T08:47:12Z","closed_at":null,"body":"Hi!\r\n\r\nI have a stateless component which consists of multiple smaller functions within the same module. Now every single function needs prop types which is super verbose. Is there a way to enforce the prop types only to the exported one or am i just missing something? I think it would make sense to have an option to enforce only the exported function to contain proptype validations.\r\n\r\nhere is an example code:\r\n\r\n``` javascript\r\n\r\nimport React, {PropTypes} from 'react';\r\nimport Stuff from './Stuff';\r\n\r\nconst MyComponent = (props) => (\r\n        <div >\r\n            <div className=\"grid-col\">\r\n                {getStuff(props)}\r\n            </div>\r\n            <div className=\"grid-col\">\r\n                {getOtherStuff(props)}\r\n            </div>\r\n        </div>\r\n);\r\n\r\nfunction getStuff(props) {\r\n    const props = {\r\n        stuff: props.someStuff\r\n    };\r\n    return <Stuff {...props} />;\r\n}\r\n//the above function is OK because of the defined proptypes\r\ngetStuff.propTypes= {someStuff: PropTypes.string}; //this could contain many many more of these which bacomes very verbose.\r\n\r\nfunction getOtherStuff(props) {\r\n    const props = {\r\n        stuff: props.someOtherStuff // Missing props validation :(\r\n    };\r\n    return <Stuff {...props} />;\r\n\r\n}\r\n\r\nMyComponent.propTypes = {\r\n    someStuff: PropTypes.string.isRequired, // imo it would make sense to define them only once per module, not for every single function\r\n    someOtherStuff: PropTypes.string.isRequired,\r\n    ...lotsOfProps\r\n};\r\n\r\nexport default MyComponent;\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/comments/220921717","html_url":"https://github.com/yannickcr/eslint-plugin-react/issues/557#issuecomment-220921717","issue_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/557","id":220921717,"user":{"login":"daisymark","id":6830835,"avatar_url":"https://avatars.githubusercontent.com/u/6830835?v=3","gravatar_id":"","url":"https://api.github.com/users/daisymark","html_url":"https://github.com/daisymark","followers_url":"https://api.github.com/users/daisymark/followers","following_url":"https://api.github.com/users/daisymark/following{/other_user}","gists_url":"https://api.github.com/users/daisymark/gists{/gist_id}","starred_url":"https://api.github.com/users/daisymark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daisymark/subscriptions","organizations_url":"https://api.github.com/users/daisymark/orgs","repos_url":"https://api.github.com/users/daisymark/repos","events_url":"https://api.github.com/users/daisymark/events{/privacy}","received_events_url":"https://api.github.com/users/daisymark/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T08:47:12Z","updated_at":"2016-05-23T08:47:12Z","body":"i want konw  too..."}}
{"actor":{"display_login":"daisymark"}}