{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/tslint/pulls/comments/74076756","id":74076756,"diff_hunk":"@@ -41,7 +55,9 @@ export class Rule extends Lint.Rules.AbstractRule {\n \n class OnlyArrowFunctionsWalker extends Lint.RuleWalker {\n     public visitFunctionDeclaration(node: ts.FunctionDeclaration) {\n-        this.addFailure(this.createFailure(node.getStart(), \"function\".length, Rule.FAILURE_STRING));\n+        if (this.getOptions().indexOf(OPTION_ALLOW_DECLARATIONS) === -1) {","path":"src/rules/onlyArrowFunctionsRule.ts","position":38,"original_position":38,"commit_id":"e8d0aba2260a3872849c5ebc38cdff040178fade","original_commit_id":"87381dc5ee6bf63c60217f8350f2e645a89f95a6","user":{"login":"JKillian","id":1400151,"avatar_url":"https://avatars.githubusercontent.com/u/1400151?v=3","gravatar_id":"","url":"https://api.github.com/users/JKillian","html_url":"https://github.com/JKillian","followers_url":"https://api.github.com/users/JKillian/followers","following_url":"https://api.github.com/users/JKillian/following{/other_user}","gists_url":"https://api.github.com/users/JKillian/gists{/gist_id}","starred_url":"https://api.github.com/users/JKillian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKillian/subscriptions","organizations_url":"https://api.github.com/users/JKillian/orgs","repos_url":"https://api.github.com/users/JKillian/repos","events_url":"https://api.github.com/users/JKillian/events{/privacy}","received_events_url":"https://api.github.com/users/JKillian/received_events","type":"User","site_admin":false},"body":"This can just be `this.hasOption(OPTION_ALLOW_DECLARATIONS)`","created_at":"2016-08-09T15:04:44Z","updated_at":"2016-08-09T15:04:44Z","html_url":"https://github.com/palantir/tslint/pull/1452#discussion_r74076756","pull_request_url":"https://api.github.com/repos/palantir/tslint/pulls/1452","_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments/74076756"},"html":{"href":"https://github.com/palantir/tslint/pull/1452#discussion_r74076756"},"pull_request":{"href":"https://api.github.com/repos/palantir/tslint/pulls/1452"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/1452","id":79671152,"html_url":"https://github.com/palantir/tslint/pull/1452","diff_url":"https://github.com/palantir/tslint/pull/1452.diff","patch_url":"https://github.com/palantir/tslint/pull/1452.patch","issue_url":"https://api.github.com/repos/palantir/tslint/issues/1452","number":1452,"state":"open","locked":false,"title":"Adding \"allow-declarations\" to only-arrow-functions","user":{"login":"JoshuaKGoldberg","id":3335181,"avatar_url":"https://avatars.githubusercontent.com/u/3335181?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"body":"This allows standalone function declarations:\r\n```typescript\r\nfunction foo() { }\r\n```\r\n\r\n...but still disallows function expressions inline:\r\n```typescript\r\nvar foo = function () { };\r\nvar bar = function () { };\r\n```\r\n\r\nFixes #1449.","created_at":"2016-08-02T03:31:33Z","updated_at":"2016-08-09T15:04:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efe4624d3a836adea29b73a03513d3519cf4cf60","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/palantir/tslint/pulls/1452/commits","review_comments_url":"https://api.github.com/repos/palantir/tslint/pulls/1452/comments","review_comment_url":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/1452/comments","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/e8d0aba2260a3872849c5ebc38cdff040178fade","head":{"label":"JoshuaKGoldberg:some-non-arrow-functions","ref":"some-non-arrow-functions","sha":"e8d0aba2260a3872849c5ebc38cdff040178fade","user":{"login":"JoshuaKGoldberg","id":3335181,"avatar_url":"https://avatars.githubusercontent.com/u/3335181?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"repo":{"id":54208042,"name":"tslint","full_name":"JoshuaKGoldberg/tslint","owner":{"login":"JoshuaKGoldberg","id":3335181,"avatar_url":"https://avatars.githubusercontent.com/u/3335181?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JoshuaKGoldberg/tslint","description":"An extensible linter for the TypeScript language.","fork":true,"url":"https://api.github.com/repos/JoshuaKGoldberg/tslint","forks_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/forks","keys_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/teams","hooks_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/hooks","issue_events_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/events","assignees_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/tags","blobs_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/languages","stargazers_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/stargazers","contributors_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/contributors","subscribers_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/subscribers","subscription_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/subscription","commits_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/merges","archive_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/downloads","issues_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/labels{/name}","releases_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/releases{/id}","deployments_url":"https://api.github.com/repos/JoshuaKGoldberg/tslint/deployments","created_at":"2016-03-18T14:37:43Z","updated_at":"2016-03-18T14:37:45Z","pushed_at":"2016-08-09T15:04:16Z","git_url":"git://github.com/JoshuaKGoldberg/tslint.git","ssh_url":"git@github.com:JoshuaKGoldberg/tslint.git","clone_url":"https://github.com/JoshuaKGoldberg/tslint.git","svn_url":"https://github.com/JoshuaKGoldberg/tslint","homepage":"http://palantir.github.io/tslint/","size":10057,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"palantir:master","ref":"master","sha":"2cfdd33bb49cf9d38c6538992812cbb746a25f87","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":11672345,"name":"tslint","full_name":"palantir/tslint","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/tslint","description":"An extensible linter for the TypeScript language.","fork":false,"url":"https://api.github.com/repos/palantir/tslint","forks_url":"https://api.github.com/repos/palantir/tslint/forks","keys_url":"https://api.github.com/repos/palantir/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/tslint/teams","hooks_url":"https://api.github.com/repos/palantir/tslint/hooks","issue_events_url":"https://api.github.com/repos/palantir/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/tslint/events","assignees_url":"https://api.github.com/repos/palantir/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/tslint/tags","blobs_url":"https://api.github.com/repos/palantir/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/tslint/languages","stargazers_url":"https://api.github.com/repos/palantir/tslint/stargazers","contributors_url":"https://api.github.com/repos/palantir/tslint/contributors","subscribers_url":"https://api.github.com/repos/palantir/tslint/subscribers","subscription_url":"https://api.github.com/repos/palantir/tslint/subscription","commits_url":"https://api.github.com/repos/palantir/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/tslint/merges","archive_url":"https://api.github.com/repos/palantir/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/tslint/downloads","issues_url":"https://api.github.com/repos/palantir/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/tslint/labels{/name}","releases_url":"https://api.github.com/repos/palantir/tslint/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/tslint/deployments","created_at":"2013-07-25T22:19:18Z","updated_at":"2016-08-09T13:22:47Z","pushed_at":"2016-08-09T15:04:16Z","git_url":"git://github.com/palantir/tslint.git","ssh_url":"git@github.com:palantir/tslint.git","clone_url":"https://github.com/palantir/tslint.git","svn_url":"https://github.com/palantir/tslint","homepage":"http://palantir.github.io/tslint/","size":11558,"stargazers_count":957,"watchers_count":957,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":240,"mirror_url":null,"open_issues_count":252,"forks":240,"open_issues":252,"watchers":957,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/1452"},"html":{"href":"https://github.com/palantir/tslint/pull/1452"},"issue":{"href":"https://api.github.com/repos/palantir/tslint/issues/1452"},"comments":{"href":"https://api.github.com/repos/palantir/tslint/issues/1452/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/tslint/pulls/1452/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/tslint/pulls/1452/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/tslint/statuses/e8d0aba2260a3872849c5ebc38cdff040178fade"}}}}
{"actor":{"display_login":"JKillian"}}