{"action":"created","comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/31389343","id":31389343,"diff_hunk":"@@ -34,21 +43,22 @@ module.exports = function() {};\n \n module.exports.prototype = {\n \n-    configure: function(options) {\n+    configure: function(operators) {\n+        var isTrue = operators === true;\n+\n         assert(\n-            options === true,\n-            this.getOptionName() + ' option requires a true value or should be removed'\n+            Array.isArray(operators) || isTrue,\n+            this.getOptionName() + ' option requires array or true value'\n         );\n-        this._operatorIndex = {\n-            '==': true,\n-            '===': true,\n-            '!=': true,\n-            '!==': true,\n-            '>': true,\n-            '<': true,\n-            '>=': true,\n-            '<=': true\n-        };\n+\n+        if (isTrue) {\n+            operators = ['==', '===', '!=', '!==', '>', '<', '>=', '<='];","path":"lib/rules/disallow-yoda-conditions.js","position":53,"original_position":53,"commit_id":"ef4b343f792756e78b33f63bac3fa65b2f268e10","original_commit_id":"ef4b343f792756e78b33f63bac3fa65b2f268e10","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},"body":"What if make ['==', '===', '!='] by default (`true`)?","created_at":"2015-05-31T11:35:33Z","updated_at":"2015-05-31T11:35:33Z","html_url":"https://github.com/jscs-dev/node-jscs/pull/1031#discussion_r31389343","pull_request_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031","_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/31389343"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1031#discussion_r31389343"},"pull_request":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031"}}},"pull_request":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031","id":28924171,"html_url":"https://github.com/jscs-dev/node-jscs/pull/1031","diff_url":"https://github.com/jscs-dev/node-jscs/pull/1031.diff","patch_url":"https://github.com/jscs-dev/node-jscs/pull/1031.patch","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1031","number":1031,"state":"open","locked":false,"title":"[WIP] (require|disallow)YodaConditions: add support for listing specific operators","user":{"login":"Slayer95","id":4925744,"avatar_url":"https://avatars.githubusercontent.com/u/4925744?v=3","gravatar_id":"","url":"https://api.github.com/users/Slayer95","html_url":"https://github.com/Slayer95","followers_url":"https://api.github.com/users/Slayer95/followers","following_url":"https://api.github.com/users/Slayer95/following{/other_user}","gists_url":"https://api.github.com/users/Slayer95/gists{/gist_id}","starred_url":"https://api.github.com/users/Slayer95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slayer95/subscriptions","organizations_url":"https://api.github.com/users/Slayer95/orgs","repos_url":"https://api.github.com/users/Slayer95/repos","events_url":"https://api.github.com/users/Slayer95/events{/privacy}","received_events_url":"https://api.github.com/users/Slayer95/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/jscs-dev/node-jscs/issues/1026","created_at":"2015-02-09T14:28:48Z","updated_at":"2015-05-31T11:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1036bcaa9ffa1b48ce5e3f3fbe86a52214aa7231","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031/commits","review_comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031/comments","review_comment_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1031/comments","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/ef4b343f792756e78b33f63bac3fa65b2f268e10","head":{"label":"Slayer95:yoda-conditions-array","ref":"yoda-conditions-array","sha":"ef4b343f792756e78b33f63bac3fa65b2f268e10","user":{"login":"Slayer95","id":4925744,"avatar_url":"https://avatars.githubusercontent.com/u/4925744?v=3","gravatar_id":"","url":"https://api.github.com/users/Slayer95","html_url":"https://github.com/Slayer95","followers_url":"https://api.github.com/users/Slayer95/followers","following_url":"https://api.github.com/users/Slayer95/following{/other_user}","gists_url":"https://api.github.com/users/Slayer95/gists{/gist_id}","starred_url":"https://api.github.com/users/Slayer95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slayer95/subscriptions","organizations_url":"https://api.github.com/users/Slayer95/orgs","repos_url":"https://api.github.com/users/Slayer95/repos","events_url":"https://api.github.com/users/Slayer95/events{/privacy}","received_events_url":"https://api.github.com/users/Slayer95/received_events","type":"User","site_admin":false},"repo":{"id":30531845,"name":"node-jscs","full_name":"Slayer95/node-jscs","owner":{"login":"Slayer95","id":4925744,"avatar_url":"https://avatars.githubusercontent.com/u/4925744?v=3","gravatar_id":"","url":"https://api.github.com/users/Slayer95","html_url":"https://github.com/Slayer95","followers_url":"https://api.github.com/users/Slayer95/followers","following_url":"https://api.github.com/users/Slayer95/following{/other_user}","gists_url":"https://api.github.com/users/Slayer95/gists{/gist_id}","starred_url":"https://api.github.com/users/Slayer95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slayer95/subscriptions","organizations_url":"https://api.github.com/users/Slayer95/orgs","repos_url":"https://api.github.com/users/Slayer95/repos","events_url":"https://api.github.com/users/Slayer95/events{/privacy}","received_events_url":"https://api.github.com/users/Slayer95/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Slayer95/node-jscs","description":"JavaScript Code Style checker","fork":true,"url":"https://api.github.com/repos/Slayer95/node-jscs","forks_url":"https://api.github.com/repos/Slayer95/node-jscs/forks","keys_url":"https://api.github.com/repos/Slayer95/node-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Slayer95/node-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Slayer95/node-jscs/teams","hooks_url":"https://api.github.com/repos/Slayer95/node-jscs/hooks","issue_events_url":"https://api.github.com/repos/Slayer95/node-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/Slayer95/node-jscs/events","assignees_url":"https://api.github.com/repos/Slayer95/node-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/Slayer95/node-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/Slayer95/node-jscs/tags","blobs_url":"https://api.github.com/repos/Slayer95/node-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Slayer95/node-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Slayer95/node-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Slayer95/node-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Slayer95/node-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/Slayer95/node-jscs/languages","stargazers_url":"https://api.github.com/repos/Slayer95/node-jscs/stargazers","contributors_url":"https://api.github.com/repos/Slayer95/node-jscs/contributors","subscribers_url":"https://api.github.com/repos/Slayer95/node-jscs/subscribers","subscription_url":"https://api.github.com/repos/Slayer95/node-jscs/subscription","commits_url":"https://api.github.com/repos/Slayer95/node-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Slayer95/node-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Slayer95/node-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Slayer95/node-jscs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Slayer95/node-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/Slayer95/node-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Slayer95/node-jscs/merges","archive_url":"https://api.github.com/repos/Slayer95/node-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Slayer95/node-jscs/downloads","issues_url":"https://api.github.com/repos/Slayer95/node-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/Slayer95/node-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/Slayer95/node-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/Slayer95/node-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Slayer95/node-jscs/labels{/name}","releases_url":"https://api.github.com/repos/Slayer95/node-jscs/releases{/id}","created_at":"2015-02-09T11:04:44Z","updated_at":"2015-03-25T02:14:11Z","pushed_at":"2015-03-25T02:19:14Z","git_url":"git://github.com/Slayer95/node-jscs.git","ssh_url":"git@github.com:Slayer95/node-jscs.git","clone_url":"https://github.com/Slayer95/node-jscs.git","svn_url":"https://github.com/Slayer95/node-jscs","homepage":"http://jscs.info/","size":2537,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jscs-dev:master","ref":"master","sha":"4617c562b991c883d22d17bb93f5a10f0bba315d","user":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":10697582,"name":"node-jscs","full_name":"jscs-dev/node-jscs","owner":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jscs-dev/node-jscs","description":"JavaScript Code Style checker","fork":false,"url":"https://api.github.com/repos/jscs-dev/node-jscs","forks_url":"https://api.github.com/repos/jscs-dev/node-jscs/forks","keys_url":"https://api.github.com/repos/jscs-dev/node-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jscs-dev/node-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jscs-dev/node-jscs/teams","hooks_url":"https://api.github.com/repos/jscs-dev/node-jscs/hooks","issue_events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/events","assignees_url":"https://api.github.com/repos/jscs-dev/node-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/jscs-dev/node-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/tags","blobs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/jscs-dev/node-jscs/languages","stargazers_url":"https://api.github.com/repos/jscs-dev/node-jscs/stargazers","contributors_url":"https://api.github.com/repos/jscs-dev/node-jscs/contributors","subscribers_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscribers","subscription_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscription","commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jscs-dev/node-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/jscs-dev/node-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jscs-dev/node-jscs/merges","archive_url":"https://api.github.com/repos/jscs-dev/node-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jscs-dev/node-jscs/downloads","issues_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/jscs-dev/node-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/jscs-dev/node-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/labels{/name}","releases_url":"https://api.github.com/repos/jscs-dev/node-jscs/releases{/id}","created_at":"2013-06-14T20:53:48Z","updated_at":"2015-05-30T14:44:49Z","pushed_at":"2015-05-31T11:13:40Z","git_url":"git://github.com/jscs-dev/node-jscs.git","ssh_url":"git@github.com:jscs-dev/node-jscs.git","clone_url":"https://github.com/jscs-dev/node-jscs.git","svn_url":"https://github.com/jscs-dev/node-jscs","homepage":"http://jscs.info/","size":12653,"stargazers_count":3347,"watchers_count":3347,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":322,"mirror_url":null,"open_issues_count":178,"forks":322,"open_issues":178,"watchers":3347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1031"},"issue":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1031"},"comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1031/comments"},"review_comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031/comments"},"review_comment":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1031/commits"},"statuses":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/ef4b343f792756e78b33f63bac3fa65b2f268e10"}}}}