{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1060","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1060/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1060/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1060/events","html_url":"https://github.com/jscs-dev/node-jscs/issues/1060","id":57694009,"number":1060,"title":"Need to decide what asserts to use for boolean rules","user":{"login":"zxqfox","id":677518,"avatar_url":"https://avatars.githubusercontent.com/u/677518?v=3","gravatar_id":"","url":"https://api.github.com/users/zxqfox","html_url":"https://github.com/zxqfox","followers_url":"https://api.github.com/users/zxqfox/followers","following_url":"https://api.github.com/users/zxqfox/following{/other_user}","gists_url":"https://api.github.com/users/zxqfox/gists{/gist_id}","starred_url":"https://api.github.com/users/zxqfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxqfox/subscriptions","organizations_url":"https://api.github.com/users/zxqfox/orgs","repos_url":"https://api.github.com/users/zxqfox/repos","events_url":"https://api.github.com/users/zxqfox/events{/privacy}","received_events_url":"https://api.github.com/users/zxqfox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jscs-dev/node-jscs/labels/question","name":"question","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-14T14:07:58Z","updated_at":"2015-03-21T01:47:07Z","closed_at":"2015-03-21T01:47:07Z","body":"We have a lot of rules with double assertion: first with `typeof`, and the second with `=== true`.\r\nAs mentioned in many PRs it's overkill to use `typeof x === 'boolean' and x === true`.\r\n\r\nThe last PRs with double check:\r\nhttps://github.com/jscs-dev/node-jscs/pull/1023/files#diff-3c958cdc2aa18d8507669afbc4372ee5R76\r\nhttps://github.com/jscs-dev/node-jscs/pull/1028/files#diff-eb24b2408e3575c79b3b3bd2a596f8aaR40\r\nhttps://github.com/jscs-dev/node-jscs/pull/1059/files#diff-572c6f5a08392c7fff2ce006ebf948ebR34\r\netc.\r\n\r\nI propose to drop `typeof === 'boolean'` asserts in all rules.\r\n\r\nWhat you think?\r\n\r\n/cc @markelog @mikesherov @mdevils @mrjoelkemp\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8575922-need-to-decide-what-asserts-to-use-for-boolean-rules?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/84217473","html_url":"https://github.com/jscs-dev/node-jscs/issues/1060#issuecomment-84217473","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1060","id":84217473,"user":{"login":"mikesherov","id":364532,"avatar_url":"https://avatars.githubusercontent.com/u/364532?v=3","gravatar_id":"","url":"https://api.github.com/users/mikesherov","html_url":"https://github.com/mikesherov","followers_url":"https://api.github.com/users/mikesherov/followers","following_url":"https://api.github.com/users/mikesherov/following{/other_user}","gists_url":"https://api.github.com/users/mikesherov/gists{/gist_id}","starred_url":"https://api.github.com/users/mikesherov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikesherov/subscriptions","organizations_url":"https://api.github.com/users/mikesherov/orgs","repos_url":"https://api.github.com/users/mikesherov/repos","events_url":"https://api.github.com/users/mikesherov/events{/privacy}","received_events_url":"https://api.github.com/users/mikesherov/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T01:47:07Z","updated_at":"2015-03-21T01:47:07Z","body":"Yup. Thanks!"}}