{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/tslint/pulls/comments/97188701","pull_request_review_id":17798157,"id":97188701,"diff_hunk":"@@ -0,0 +1,75 @@\n+/**\n+ * @license\n+ * Copyright 2017 Palantir Technologies, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import * as ts from \"typescript\";\n+import * as Lint from \"../index\";\n+\n+export class Rule extends Lint.Rules.TypedRule {\n+    /* tslint:disable:object-literal-sort-keys */\n+    public static metadata: Lint.IRuleMetadata = {\n+        ruleName: \"no-unbound-method\",\n+        description: \"Warns when a method is used as outside of a method call.\",\n+        optionsDescription: \"Not configurable.\",\n+        options: null,\n+        optionExamples: [\"true\"],\n+        type: \"functionality\",\n+        typescriptOnly: true,\n+        requiresTypeInfo: true,\n+    };\n+    /* tslint:enable:object-literal-sort-keys */\n+\n+    public static FAILURE_STRING = \"'this' may be unbound when a method is used as a property without being invoked.\";","path":"src/rules/noUnboundMethodRule.ts","position":null,"original_position":35,"commit_id":"6b5ebd0a07b08c1ffbd347cb4cd85b26348913ea","original_commit_id":"ce7cb0d25d27307d2634e9f67b857e9e113c0cce","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"body":"Removed \"class\" from that since it may be on an interface.","created_at":"2017-01-21T02:45:33Z","updated_at":"2017-01-21T02:45:33Z","html_url":"https://github.com/palantir/tslint/pull/2089#discussion_r97188701","pull_request_url":"https://api.github.com/repos/palantir/tslint/pulls/2089","_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments/97188701"},"html":{"href":"https://github.com/palantir/tslint/pull/2089#discussion_r97188701"},"pull_request":{"href":"https://api.github.com/repos/palantir/tslint/pulls/2089"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/2089","id":102562019,"html_url":"https://github.com/palantir/tslint/pull/2089","diff_url":"https://github.com/palantir/tslint/pull/2089.diff","patch_url":"https://github.com/palantir/tslint/pull/2089.patch","issue_url":"https://api.github.com/repos/palantir/tslint/issues/2089","number":2089,"state":"open","locked":false,"title":"Add `no-unbound-method` rule","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"body":"#### PR checklist\r\n\r\n- [X] Addresses an existing issue: #259\r\n- [X] New feature, bugfix, or enhancement\r\n  - [X] Includes tests\r\n- [X] Documentation update\r\n\r\n#### What changes did you make?\r\n\r\nAdded the `no-unbound-method` rule, which forbids the use of `x.foo` where `foo` is a method on a class or interface, but allows `y => x.foo(y)`.\r\n","created_at":"2017-01-21T00:52:37Z","updated_at":"2017-01-21T02:45:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cffd29ccd29d71f93031a8b46bab3156e6f0619","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/palantir/tslint/pulls/2089/commits","review_comments_url":"https://api.github.com/repos/palantir/tslint/pulls/2089/comments","review_comment_url":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/2089/comments","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/6b5ebd0a07b08c1ffbd347cb4cd85b26348913ea","head":{"label":"andy-hanson:no_use_method_as_function","ref":"no_use_method_as_function","sha":"6b5ebd0a07b08c1ffbd347cb4cd85b26348913ea","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"repo":{"id":69823822,"name":"tslint","full_name":"andy-hanson/tslint","owner":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andy-hanson/tslint","description":"An extensible linter for the TypeScript language.","fork":true,"url":"https://api.github.com/repos/andy-hanson/tslint","forks_url":"https://api.github.com/repos/andy-hanson/tslint/forks","keys_url":"https://api.github.com/repos/andy-hanson/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andy-hanson/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andy-hanson/tslint/teams","hooks_url":"https://api.github.com/repos/andy-hanson/tslint/hooks","issue_events_url":"https://api.github.com/repos/andy-hanson/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/andy-hanson/tslint/events","assignees_url":"https://api.github.com/repos/andy-hanson/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/andy-hanson/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/andy-hanson/tslint/tags","blobs_url":"https://api.github.com/repos/andy-hanson/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andy-hanson/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andy-hanson/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/andy-hanson/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andy-hanson/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/andy-hanson/tslint/languages","stargazers_url":"https://api.github.com/repos/andy-hanson/tslint/stargazers","contributors_url":"https://api.github.com/repos/andy-hanson/tslint/contributors","subscribers_url":"https://api.github.com/repos/andy-hanson/tslint/subscribers","subscription_url":"https://api.github.com/repos/andy-hanson/tslint/subscription","commits_url":"https://api.github.com/repos/andy-hanson/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/andy-hanson/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/andy-hanson/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/andy-hanson/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/andy-hanson/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/andy-hanson/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andy-hanson/tslint/merges","archive_url":"https://api.github.com/repos/andy-hanson/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andy-hanson/tslint/downloads","issues_url":"https://api.github.com/repos/andy-hanson/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/andy-hanson/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/andy-hanson/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/andy-hanson/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andy-hanson/tslint/labels{/name}","releases_url":"https://api.github.com/repos/andy-hanson/tslint/releases{/id}","deployments_url":"https://api.github.com/repos/andy-hanson/tslint/deployments","created_at":"2016-10-02T21:43:52Z","updated_at":"2016-10-02T21:43:54Z","pushed_at":"2017-01-21T02:44:59Z","git_url":"git://github.com/andy-hanson/tslint.git","ssh_url":"git@github.com:andy-hanson/tslint.git","clone_url":"https://github.com/andy-hanson/tslint.git","svn_url":"https://github.com/andy-hanson/tslint","homepage":"http://palantir.github.io/tslint/","size":11377,"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":"d65114566808959c3d7ce423b68b4474f4edd232","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":":vertical_traffic_light: 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":"2017-01-20T19:39:12Z","pushed_at":"2017-01-21T02:45:00Z","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":11359,"stargazers_count":1401,"watchers_count":1401,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":326,"mirror_url":null,"open_issues_count":313,"forks":326,"open_issues":313,"watchers":1401,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/2089"},"html":{"href":"https://github.com/palantir/tslint/pull/2089"},"issue":{"href":"https://api.github.com/repos/palantir/tslint/issues/2089"},"comments":{"href":"https://api.github.com/repos/palantir/tslint/issues/2089/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/tslint/pulls/2089/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/tslint/pulls/2089/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/tslint/statuses/6b5ebd0a07b08c1ffbd347cb4cd85b26348913ea"}}}}
{"actor":{"display_login":"andy-hanson"}}