{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/hound/pulls/comments/42112800","id":42112800,"diff_hunk":"@@ -19,29 +19,42 @@ def review_files\n \n   private\n \n+  JAVASCRIPT_LINTERS = [\n+    Linter::Eslint,\n+    Linter::JavaScript,\n+  ]\n+\n   LINTERS = [\n     Linter::CoffeeScript,\n     Linter::Go,\n     Linter::Haml,\n-    Linter::JavaScript,\n     Linter::Python,\n     Linter::Ruby,\n     Linter::Scss,\n     Linter::Swift,\n-    Linter::Unsupported,\n-  ].freeze\n+  ] + JAVASCRIPT_LINTERS\n+\n+  DEFAULT_LINTER = Linter::Unsupported\n \n   def build_linter(filename)\n-    linter_class = find_linter_class(filename)\n-    linters[linter_class] ||= linter_class.new(\n+    linter_classes = find_linter_classes(filename)\n+    linter = linter_classes.","path":"app/models/style_checker.rb","position":28,"original_position":28,"commit_id":"7fba3dd317bf5d993e74128f8a801c647825b6d9","original_commit_id":"7fba3dd317bf5d993e74128f8a801c647825b6d9","user":{"login":"teoljungberg","id":810650,"avatar_url":"https://avatars.githubusercontent.com/u/810650?v=3","gravatar_id":"","url":"https://api.github.com/users/teoljungberg","html_url":"https://github.com/teoljungberg","followers_url":"https://api.github.com/users/teoljungberg/followers","following_url":"https://api.github.com/users/teoljungberg/following{/other_user}","gists_url":"https://api.github.com/users/teoljungberg/gists{/gist_id}","starred_url":"https://api.github.com/users/teoljungberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teoljungberg/subscriptions","organizations_url":"https://api.github.com/users/teoljungberg/orgs","repos_url":"https://api.github.com/users/teoljungberg/repos","events_url":"https://api.github.com/users/teoljungberg/events{/privacy}","received_events_url":"https://api.github.com/users/teoljungberg/received_events","type":"User","site_admin":false},"body":"It does, and I'm a bit torn by it. My thinking is that it would be confusing for the user if they got comments from two different linters, which might collide. But that might be an edge-case. What do you think?\n\n> On Oct 14, 2015, at 17:19, Scott Albertson <notifications@github.com> wrote:\n> \n> In app/models/style_checker.rb:\n> \n> >\n> >    def build_linter(filename)\n> > -    linter_class = find_linter_class(filename)\n> > -    linters[linter_class] ||= linter_class.new(\n> > +    linter_classes = find_linter_classes(filename)\n> > +    linter = linter_classes.\n> \n> Does this limit one linter per file?\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n\n","created_at":"2015-10-15T11:33:06Z","updated_at":"2015-10-15T11:33:06Z","html_url":"https://github.com/thoughtbot/hound/pull/961#discussion_r42112800","pull_request_url":"https://api.github.com/repos/thoughtbot/hound/pulls/961","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/comments/42112800"},"html":{"href":"https://github.com/thoughtbot/hound/pull/961#discussion_r42112800"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/961"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/hound/pulls/961","id":47512347,"html_url":"https://github.com/thoughtbot/hound/pull/961","diff_url":"https://github.com/thoughtbot/hound/pull/961.diff","patch_url":"https://github.com/thoughtbot/hound/pull/961.patch","issue_url":"https://api.github.com/repos/thoughtbot/hound/issues/961","number":961,"state":"open","locked":false,"title":"Add support for `Eslint` alongside `JShint`","user":{"login":"teoljungberg","id":810650,"avatar_url":"https://avatars.githubusercontent.com/u/810650?v=3","gravatar_id":"","url":"https://api.github.com/users/teoljungberg","html_url":"https://github.com/teoljungberg","followers_url":"https://api.github.com/users/teoljungberg/followers","following_url":"https://api.github.com/users/teoljungberg/following{/other_user}","gists_url":"https://api.github.com/users/teoljungberg/gists{/gist_id}","starred_url":"https://api.github.com/users/teoljungberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teoljungberg/subscriptions","organizations_url":"https://api.github.com/users/teoljungberg/orgs","repos_url":"https://api.github.com/users/teoljungberg/repos","events_url":"https://api.github.com/users/teoljungberg/events{/privacy}","received_events_url":"https://api.github.com/users/teoljungberg/received_events","type":"User","site_admin":false},"body":"Eslint is disabled by default, alongside any other Beta linters.\r\nTo enabled it, simplify configure your `.hound.yml`:\r\n\r\n```yaml\r\neslint:\r\n  enabled: true\r\n  config_file: config/.eslintrc\r\n  ignore_file: config/.eslintignore\r\n```\r\n\r\nThis is going to be backed by [hound-eslint]\r\n\r\n[hound-eslint]: https://github.com/thoughtbot/hound-eslint\r\n\r\nChanges:\r\n\r\n- Implement `Linter::Eslint` with configuration.\r\n  Support `*.js`, `*.es6.js, for file extensions. Reuse the\r\n  `FILE_REGEXP` from `Linter::JavaScript` to avoid duplication between\r\n  the JavaScript linters.\r\n- Use `Linter::Eslint` for `*.js` files if it is enabled. If not,\r\n  fallback to `Linter::JavaScript`. \r\n- Replace `!collection.any?` with `collection.none?`\r\n\r\nhttps://trello.com/c/2a6yQORa","created_at":"2015-10-13T09:55:18Z","updated_at":"2015-10-15T11:33:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e87e3a5edb8eff55d493d43e797041f76864e8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/hound/pulls/961/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/hound/pulls/961/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/hound/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/hound/issues/961/comments","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/7fba3dd317bf5d993e74128f8a801c647825b6d9","head":{"label":"thoughtbot:eslint","ref":"eslint","sha":"7fba3dd317bf5d993e74128f8a801c647825b6d9","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"thoughtbot/hound","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/hound","description":"Automated review for code style.","fork":false,"url":"https://api.github.com/repos/thoughtbot/hound","forks_url":"https://api.github.com/repos/thoughtbot/hound/forks","keys_url":"https://api.github.com/repos/thoughtbot/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/hound/teams","hooks_url":"https://api.github.com/repos/thoughtbot/hound/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/hound/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/hound/events","assignees_url":"https://api.github.com/repos/thoughtbot/hound/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/hound/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/hound/tags","blobs_url":"https://api.github.com/repos/thoughtbot/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/hound/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/hound/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/hound/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/hound/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/hound/subscription","commits_url":"https://api.github.com/repos/thoughtbot/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/hound/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/hound/merges","archive_url":"https://api.github.com/repos/thoughtbot/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/hound/downloads","issues_url":"https://api.github.com/repos/thoughtbot/hound/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/hound/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/hound/releases{/id}","created_at":"2013-01-02T18:12:40Z","updated_at":"2015-10-15T10:27:46Z","pushed_at":"2015-10-14T15:13:04Z","git_url":"git://github.com/thoughtbot/hound.git","ssh_url":"git@github.com:thoughtbot/hound.git","clone_url":"https://github.com/thoughtbot/hound.git","svn_url":"https://github.com/thoughtbot/hound","homepage":"https://houndci.com","size":16413,"stargazers_count":1061,"watchers_count":1061,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":22,"forks":218,"open_issues":22,"watchers":1061,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"fec130bfe8f411c22681cfe74f7cfd133c3b5ca4","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"thoughtbot/hound","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/hound","description":"Automated review for code style.","fork":false,"url":"https://api.github.com/repos/thoughtbot/hound","forks_url":"https://api.github.com/repos/thoughtbot/hound/forks","keys_url":"https://api.github.com/repos/thoughtbot/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/hound/teams","hooks_url":"https://api.github.com/repos/thoughtbot/hound/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/hound/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/hound/events","assignees_url":"https://api.github.com/repos/thoughtbot/hound/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/hound/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/hound/tags","blobs_url":"https://api.github.com/repos/thoughtbot/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/hound/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/hound/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/hound/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/hound/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/hound/subscription","commits_url":"https://api.github.com/repos/thoughtbot/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/hound/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/hound/merges","archive_url":"https://api.github.com/repos/thoughtbot/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/hound/downloads","issues_url":"https://api.github.com/repos/thoughtbot/hound/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/hound/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/hound/releases{/id}","created_at":"2013-01-02T18:12:40Z","updated_at":"2015-10-15T10:27:46Z","pushed_at":"2015-10-14T15:13:04Z","git_url":"git://github.com/thoughtbot/hound.git","ssh_url":"git@github.com:thoughtbot/hound.git","clone_url":"https://github.com/thoughtbot/hound.git","svn_url":"https://github.com/thoughtbot/hound","homepage":"https://houndci.com","size":16413,"stargazers_count":1061,"watchers_count":1061,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":22,"forks":218,"open_issues":22,"watchers":1061,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/961"},"html":{"href":"https://github.com/thoughtbot/hound/pull/961"},"issue":{"href":"https://api.github.com/repos/thoughtbot/hound/issues/961"},"comments":{"href":"https://api.github.com/repos/thoughtbot/hound/issues/961/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/961/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/961/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/hound/statuses/7fba3dd317bf5d993e74128f8a801c647825b6d9"}}}}