{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/react-with-styles/issues/33","repository_url":"https://api.github.com/repos/airbnb/react-with-styles","labels_url":"https://api.github.com/repos/airbnb/react-with-styles/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/react-with-styles/issues/33/comments","events_url":"https://api.github.com/repos/airbnb/react-with-styles/issues/33/events","html_url":"https://github.com/airbnb/react-with-styles/issues/33","id":187860758,"number":33,"title":"`styles` prop validation","user":{"login":"Andreyco","id":829963,"avatar_url":"https://avatars.githubusercontent.com/u/829963?v=3","gravatar_id":"","url":"https://api.github.com/users/Andreyco","html_url":"https://github.com/Andreyco","followers_url":"https://api.github.com/users/Andreyco/followers","following_url":"https://api.github.com/users/Andreyco/following{/other_user}","gists_url":"https://api.github.com/users/Andreyco/gists{/gist_id}","starred_url":"https://api.github.com/users/Andreyco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andreyco/subscriptions","organizations_url":"https://api.github.com/users/Andreyco/orgs","repos_url":"https://api.github.com/users/Andreyco/repos","events_url":"https://api.github.com/users/Andreyco/events{/privacy}","received_events_url":"https://api.github.com/users/Andreyco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-07T23:34:56Z","updated_at":"2016-11-08T00:40:17Z","closed_at":null,"body":"I, with many of us, use your ESLint config preset, which is great.\r\nIt happens there are rules I don't like and I override them.\r\n\r\nI am not sure about `react/forbid-prop-types` rule and its setting, which is following:\r\n```\r\n'react/forbid-prop-types': ['error', { forbid: ['any', 'array', 'object'] }],\r\n```\r\n\r\nI find it very useful, but hate it when it comes to `styles` prop. This is no-go with default preset:\r\n```\r\nLabel.propTypes = {\r\n  styles: PropTypes.object.isRequired,\r\n};\r\n```\r\nTo validate (and satisfy ESLint) I have to use `shape` validation rule and write down rules for all styles passed by decorator function - repeated work here. Since `styles` is defined in very same file and there is very little that could go wrong, I don't feel like paying special attention to that prop. \r\n\r\nHow do you validate `styles` prop at AirBnb?\r\n\r\nThanks for answer!\r\n\r\n---\r\nOkay, to be honest I often abuse vague `shape` validator function, without specifying actual shape of `styles` prop.\r\n```\r\nLabel.propTypes = {\r\n  styles: PropTypes.shape().isRequired,\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/airbnb/react-with-styles/issues/comments/259010137","html_url":"https://github.com/airbnb/react-with-styles/issues/33#issuecomment-259010137","issue_url":"https://api.github.com/repos/airbnb/react-with-styles/issues/33","id":259010137,"user":{"login":"Andreyco","id":829963,"avatar_url":"https://avatars.githubusercontent.com/u/829963?v=3","gravatar_id":"","url":"https://api.github.com/users/Andreyco","html_url":"https://github.com/Andreyco","followers_url":"https://api.github.com/users/Andreyco/followers","following_url":"https://api.github.com/users/Andreyco/following{/other_user}","gists_url":"https://api.github.com/users/Andreyco/gists{/gist_id}","starred_url":"https://api.github.com/users/Andreyco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andreyco/subscriptions","organizations_url":"https://api.github.com/users/Andreyco/orgs","repos_url":"https://api.github.com/users/Andreyco/repos","events_url":"https://api.github.com/users/Andreyco/events{/privacy}","received_events_url":"https://api.github.com/users/Andreyco/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T00:40:17Z","updated_at":"2016-11-08T00:40:17Z","body":"Will take a look into this. Are you open to PRs?"}}
{"actor":{"display_login":"Andreyco"}}