{"action":"created","issue":{"url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/8","repository_url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest","labels_url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/8/comments","events_url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/8/events","html_url":"https://github.com/pinterest-web/eslint-config-pinterest/issues/8","id":138597765,"number":8,"title":"Consider doing pure alpha sorting on sort-prop-types","user":{"login":"KevinGrandon","id":122602,"avatar_url":"https://avatars.githubusercontent.com/u/122602?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinGrandon","html_url":"https://github.com/KevinGrandon","followers_url":"https://api.github.com/users/KevinGrandon/followers","following_url":"https://api.github.com/users/KevinGrandon/following{/other_user}","gists_url":"https://api.github.com/users/KevinGrandon/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinGrandon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinGrandon/subscriptions","organizations_url":"https://api.github.com/users/KevinGrandon/orgs","repos_url":"https://api.github.com/users/KevinGrandon/repos","events_url":"https://api.github.com/users/KevinGrandon/events{/privacy}","received_events_url":"https://api.github.com/users/KevinGrandon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-04T21:56:10Z","updated_at":"2016-03-04T22:09:50Z","closed_at":null,"body":"Currently our sort-prop-types definition looks like: \r\n```\r\n        'react/sort-prop-types': [2, {\r\n            'callbacksLast': true,\r\n            'ignoreCase': true,\r\n            'requiredFirst': true,\r\n        }],\r\n```\r\n\r\nThis means that in some cases, we might have some component that looks like:\r\n```js\r\nMyComponent.propTypes = {\r\n  selected: PropTypes.bool.isRequired,\r\n  onChange: PropTypes.func.isRequired,\r\n  anotherProp: PropTypes.string,\r\n  zebraProp: PropTypes.string,\r\n  onOptionalEvent: PropTypes.func\r\n};\r\n```\r\n\r\nI feel that `callbacksLast` and `requiredFirst` being true cause this list to be not as readable when they are false. The same list when both are false:\r\n\r\n```js\r\nMyComponent.propTypes = {\r\n  anotherProp: PropTypes.string,\r\n  onChange: PropTypes.func.isRequired,\r\n  onOptionalEvent: PropTypes.func\r\n  selected: PropTypes.bool.isRequired,\r\n  zebraProp: PropTypes.string,\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/comments/192491153","html_url":"https://github.com/pinterest-web/eslint-config-pinterest/issues/8#issuecomment-192491153","issue_url":"https://api.github.com/repos/pinterest-web/eslint-config-pinterest/issues/8","id":192491153,"user":{"login":"zackargyle","id":3934294,"avatar_url":"https://avatars.githubusercontent.com/u/3934294?v=3","gravatar_id":"","url":"https://api.github.com/users/zackargyle","html_url":"https://github.com/zackargyle","followers_url":"https://api.github.com/users/zackargyle/followers","following_url":"https://api.github.com/users/zackargyle/following{/other_user}","gists_url":"https://api.github.com/users/zackargyle/gists{/gist_id}","starred_url":"https://api.github.com/users/zackargyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackargyle/subscriptions","organizations_url":"https://api.github.com/users/zackargyle/orgs","repos_url":"https://api.github.com/users/zackargyle/repos","events_url":"https://api.github.com/users/zackargyle/events{/privacy}","received_events_url":"https://api.github.com/users/zackargyle/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T22:09:50Z","updated_at":"2016-03-04T22:09:50Z","body":"I agree with yanking out `requiredFirst`, but I do like `callbacksLast`.\r\n\r\n```\r\nMyComponent.propTypes = {\r\n  anotherProp: PropTypes.string,\r\n  selected: PropTypes.bool.isRequired,\r\n  zebraProp: PropTypes.string,\r\n  onChange: PropTypes.func.isRequired,\r\n  onOptionalEvent: PropTypes.func\r\n};\r\n```"}}