{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/31433582","id":31433582,"diff_hunk":"@@ -86,9 +98,17 @@ then\n   $JSHINT_EXECUTABLE $JSHINT_ARGS $js_changed_files\n   jshint_result=$?\n \n-  if [ $gjslint_result -ne 0 -o $jshint_result -ne 0 ] ; then\n+  eslint_result=0\n+  if [ -r \".eslintrc\" ];\n+  then\n+    $ESLINT_EXECUTABLE $ESLINT_ARGS $js_changed_files\n+    eslint_result=$?\n+  fi\n+\n+  if [ $gjslint_result -ne 0 -o $jshint_result -ne 0 -o $eslint_results -ne 0 ] ; then","path":"tools/pre-commit","position":45,"original_position":45,"commit_id":"0d2c63cf5b28c846071c1a51a103da3dc1140743","original_commit_id":"0d2c63cf5b28c846071c1a51a103da3dc1140743","user":{"login":"julienw","id":454175,"avatar_url":"https://avatars.githubusercontent.com/u/454175?v=3","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"body":"The hook doesn't work properly because.... you put a \"s\" at the end of `$eslint_result` in the comparison ;)","created_at":"2015-06-01T15:00:04Z","updated_at":"2015-06-01T15:00:04Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/30046#discussion_r31433582","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/31433582"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/30046#discussion_r31433582"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046","id":35321207,"html_url":"https://github.com/mozilla-b2g/gaia/pull/30046","diff_url":"https://github.com/mozilla-b2g/gaia/pull/30046.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/30046.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/30046","number":30046,"state":"open","locked":false,"title":"Bug 1159667 - add eslint to tests","user":{"login":"mozfreddyb","id":5418775,"avatar_url":"https://avatars.githubusercontent.com/u/5418775?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfreddyb","html_url":"https://github.com/mozfreddyb","followers_url":"https://api.github.com/users/mozfreddyb/followers","following_url":"https://api.github.com/users/mozfreddyb/following{/other_user}","gists_url":"https://api.github.com/users/mozfreddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfreddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfreddyb/subscriptions","organizations_url":"https://api.github.com/users/mozfreddyb/orgs","repos_url":"https://api.github.com/users/mozfreddyb/repos","events_url":"https://api.github.com/users/mozfreddyb/events{/privacy}","received_events_url":"https://api.github.com/users/mozfreddyb/received_events","type":"User","site_admin":false},"body":"This adds an eslint task, using eslint 0.21.0 and eslint-plugin-no-unsafe-innerhtml 0.1.2.\r\n\r\nThe .eslintrc config disables all rules except the one introduced by the plugin. We can add more over time. For now, it takes JSHINT environment variables in the makefile.\r\n\r\nThe failure in treeherder is intentional, given that there is innerHTML in Gaia to complain about ;)","created_at":"2015-05-13T12:28:06Z","updated_at":"2015-06-01T15:00:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"290aed5f2208f9a2b8ccffd127e221684d294a26","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/30046/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/0d2c63cf5b28c846071c1a51a103da3dc1140743","head":{"label":"mozfreddyb:eslint-tasks","ref":"eslint-tasks","sha":"0d2c63cf5b28c846071c1a51a103da3dc1140743","user":{"login":"mozfreddyb","id":5418775,"avatar_url":"https://avatars.githubusercontent.com/u/5418775?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfreddyb","html_url":"https://github.com/mozfreddyb","followers_url":"https://api.github.com/users/mozfreddyb/followers","following_url":"https://api.github.com/users/mozfreddyb/following{/other_user}","gists_url":"https://api.github.com/users/mozfreddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfreddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfreddyb/subscriptions","organizations_url":"https://api.github.com/users/mozfreddyb/orgs","repos_url":"https://api.github.com/users/mozfreddyb/repos","events_url":"https://api.github.com/users/mozfreddyb/events{/privacy}","received_events_url":"https://api.github.com/users/mozfreddyb/received_events","type":"User","site_admin":false},"repo":{"id":12944840,"name":"gaia","full_name":"mozfreddyb/gaia","owner":{"login":"mozfreddyb","id":5418775,"avatar_url":"https://avatars.githubusercontent.com/u/5418775?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfreddyb","html_url":"https://github.com/mozfreddyb","followers_url":"https://api.github.com/users/mozfreddyb/followers","following_url":"https://api.github.com/users/mozfreddyb/following{/other_user}","gists_url":"https://api.github.com/users/mozfreddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfreddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfreddyb/subscriptions","organizations_url":"https://api.github.com/users/mozfreddyb/orgs","repos_url":"https://api.github.com/users/mozfreddyb/repos","events_url":"https://api.github.com/users/mozfreddyb/events{/privacy}","received_events_url":"https://api.github.com/users/mozfreddyb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mozfreddyb/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/mozfreddyb/gaia","forks_url":"https://api.github.com/repos/mozfreddyb/gaia/forks","keys_url":"https://api.github.com/repos/mozfreddyb/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozfreddyb/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozfreddyb/gaia/teams","hooks_url":"https://api.github.com/repos/mozfreddyb/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozfreddyb/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozfreddyb/gaia/events","assignees_url":"https://api.github.com/repos/mozfreddyb/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozfreddyb/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozfreddyb/gaia/tags","blobs_url":"https://api.github.com/repos/mozfreddyb/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozfreddyb/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozfreddyb/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozfreddyb/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozfreddyb/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozfreddyb/gaia/languages","stargazers_url":"https://api.github.com/repos/mozfreddyb/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozfreddyb/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozfreddyb/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozfreddyb/gaia/subscription","commits_url":"https://api.github.com/repos/mozfreddyb/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozfreddyb/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozfreddyb/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozfreddyb/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozfreddyb/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozfreddyb/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozfreddyb/gaia/merges","archive_url":"https://api.github.com/repos/mozfreddyb/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozfreddyb/gaia/downloads","issues_url":"https://api.github.com/repos/mozfreddyb/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozfreddyb/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozfreddyb/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozfreddyb/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozfreddyb/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozfreddyb/gaia/releases{/id}","created_at":"2013-09-19T09:15:44Z","updated_at":"2014-08-04T08:54:43Z","pushed_at":"2015-06-01T11:04:09Z","git_url":"git://github.com/mozfreddyb/gaia.git","ssh_url":"git@github.com:mozfreddyb/gaia.git","clone_url":"https://github.com/mozfreddyb/gaia.git","svn_url":"https://github.com/mozfreddyb/gaia","homepage":"https://wiki.mozilla.org/B2G","size":892128,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mozilla-b2g:master","ref":"master","sha":"14968bb2c34ca406a696d8281aa0b76cf87dbbff","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-05-29T08:27:33Z","pushed_at":"2015-06-01T14:09:29Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1676398,"stargazers_count":1935,"watchers_count":1935,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2318,"mirror_url":null,"open_issues_count":1011,"forks":2318,"open_issues":1011,"watchers":1935,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/30046"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/30046"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/30046/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/30046/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/0d2c63cf5b28c846071c1a51a103da3dc1140743"}}}}