{"action":"created","comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/45403639","id":45403639,"diff_hunk":"@@ -0,0 +1,43 @@\n+var assert = require('assert');\n+\n+module.exports = function() {};\n+\n+module.exports.prototype = {\n+    configure: function(options) {\n+        assert(\n+            options === 'noElse',\n+            this.getOptionName() + ' option allow only the `noElse` value'\n+        );\n+    },\n+\n+    getOptionName: function() {\n+        return 'requireEarlyReturn';\n+    },\n+\n+    check: function(file, errors) {\n+        function addError(entity) {\n+            errors.add(\n+                'use of else after return',","path":"lib/rules/require-early-return.js","position":20,"original_position":20,"commit_id":"629a0b388b97846e1acf7dfabb743bd849864c4f","original_commit_id":"629a0b388b97846e1acf7dfabb743bd849864c4f","user":{"login":"markelog","id":945528,"avatar_url":"https://avatars.githubusercontent.com/u/945528?v=3","gravatar_id":"","url":"https://api.github.com/users/markelog","html_url":"https://github.com/markelog","followers_url":"https://api.github.com/users/markelog/followers","following_url":"https://api.github.com/users/markelog/following{/other_user}","gists_url":"https://api.github.com/users/markelog/gists{/gist_id}","starred_url":"https://api.github.com/users/markelog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markelog/subscriptions","organizations_url":"https://api.github.com/users/markelog/orgs","repos_url":"https://api.github.com/users/markelog/repos","events_url":"https://api.github.com/users/markelog/events{/privacy}","received_events_url":"https://api.github.com/users/markelog/received_events","type":"User","site_admin":false},"body":"First letter should be in uppercase","created_at":"2015-11-19T21:34:13Z","updated_at":"2015-11-19T21:34:13Z","html_url":"https://github.com/jscs-dev/node-jscs/pull/1989#discussion_r45403639","pull_request_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989","_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/45403639"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1989#discussion_r45403639"},"pull_request":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989"}}},"pull_request":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989","id":51265822,"html_url":"https://github.com/jscs-dev/node-jscs/pull/1989","diff_url":"https://github.com/jscs-dev/node-jscs/pull/1989.diff","patch_url":"https://github.com/jscs-dev/node-jscs/pull/1989.patch","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1989","number":1989,"state":"open","locked":false,"title":"New rule: requireEarlyReturn","user":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"body":"With this PR now this config `{ requireEarlyReturn: 'noElse' }` would cause the use of else after return to be forbidden.\r\nWhile this should close https://github.com/jscs-dev/node-jscs/issues/1223, it doesn't change the if conditions as seems requested in the first comment.\r\n","created_at":"2015-11-19T19:05:24Z","updated_at":"2015-11-19T21:34:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c199ad209589c47cfad97e85c8296afa4ef61340","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989/commits","review_comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989/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/1989/comments","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/629a0b388b97846e1acf7dfabb743bd849864c4f","head":{"label":"ficristo:require-early-return","ref":"require-early-return","sha":"629a0b388b97846e1acf7dfabb743bd849864c4f","user":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"repo":{"id":44622255,"name":"node-jscs","full_name":"ficristo/node-jscs","owner":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ficristo/node-jscs","description":"JavaScript Code Style checker","fork":true,"url":"https://api.github.com/repos/ficristo/node-jscs","forks_url":"https://api.github.com/repos/ficristo/node-jscs/forks","keys_url":"https://api.github.com/repos/ficristo/node-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ficristo/node-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ficristo/node-jscs/teams","hooks_url":"https://api.github.com/repos/ficristo/node-jscs/hooks","issue_events_url":"https://api.github.com/repos/ficristo/node-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/ficristo/node-jscs/events","assignees_url":"https://api.github.com/repos/ficristo/node-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/ficristo/node-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/ficristo/node-jscs/tags","blobs_url":"https://api.github.com/repos/ficristo/node-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ficristo/node-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ficristo/node-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ficristo/node-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ficristo/node-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/ficristo/node-jscs/languages","stargazers_url":"https://api.github.com/repos/ficristo/node-jscs/stargazers","contributors_url":"https://api.github.com/repos/ficristo/node-jscs/contributors","subscribers_url":"https://api.github.com/repos/ficristo/node-jscs/subscribers","subscription_url":"https://api.github.com/repos/ficristo/node-jscs/subscription","commits_url":"https://api.github.com/repos/ficristo/node-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ficristo/node-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ficristo/node-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ficristo/node-jscs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ficristo/node-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/ficristo/node-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ficristo/node-jscs/merges","archive_url":"https://api.github.com/repos/ficristo/node-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ficristo/node-jscs/downloads","issues_url":"https://api.github.com/repos/ficristo/node-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/ficristo/node-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/ficristo/node-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/ficristo/node-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ficristo/node-jscs/labels{/name}","releases_url":"https://api.github.com/repos/ficristo/node-jscs/releases{/id}","created_at":"2015-10-20T17:13:29Z","updated_at":"2015-10-20T17:13:31Z","pushed_at":"2015-11-19T19:18:55Z","git_url":"git://github.com/ficristo/node-jscs.git","ssh_url":"git@github.com:ficristo/node-jscs.git","clone_url":"https://github.com/ficristo/node-jscs.git","svn_url":"https://github.com/ficristo/node-jscs","homepage":"http://jscs.info/","size":3882,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"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":"2b6a93cb0afed0b4bd401bb626f4aeca17f32681","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-11-19T16:06:41Z","pushed_at":"2015-11-19T20:24:30Z","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":6438,"stargazers_count":4367,"watchers_count":4367,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":461,"mirror_url":null,"open_issues_count":180,"forks":461,"open_issues":180,"watchers":4367,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1989"},"issue":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1989"},"comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1989/comments"},"review_comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1989/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/1989/commits"},"statuses":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/629a0b388b97846e1acf7dfabb743bd849864c4f"}}}}