{"action":"created","comment":{"url":"https://api.github.com/repos/webhintio/hint/pulls/comments/260567380","pull_request_review_id":208303128,"id":260567380,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MDU2NzM4MA==","diff_hunk":"@@ -70,26 +68,28 @@ export default class CreateElementSvgHint implements IHint {\n             const results = linter.verify(sourceCode, { rules: { 'svg-create': 'error' } });\n \n             for (const result of results) {\n-                let position = scriptElement.getLocation() || null;\n+                const element = scriptData.element;\n+\n+                if (element === null) {\n+                    return;\n+                }\n+\n+                let position = element.getLocation() || null;\n                 let line = 0;\n \n                 /*\n                  * Eslint returns location data starting at <script>\n                  * This offsets the line number so that it is relative\n                  * to the full source code and not just the <script> tag\n                  */\n-                if (scriptElement && scriptData.resource === 'Internal javascript') {\n-                    position = await findProblemLocation(scriptElement, { column: 0, line: 0 }, result.source === null ? '' : result.source);\n+                if (scriptData.resource === 'Internal javascript') {\n+                    position = await findProblemLocation(element, { column: 0, line: 0 }, result.source === null ? '' : result.source);\n                     line = position !== null ? position.line : 0;","path":"packages/hint-create-element-svg/src/hint.ts","position":87,"original_position":32,"commit_id":"d6f84f9ec17e7ccdd26af5a7d3933626a054e21e","original_commit_id":"d6f84f9ec17e7ccdd26af5a7d3933626a054e21e","user":{"login":"antross","id":785009,"node_id":"MDQ6VXNlcjc4NTAwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/785009?v=4","gravatar_id":"","url":"https://api.github.com/users/antross","html_url":"https://github.com/antross","followers_url":"https://api.github.com/users/antross/followers","following_url":"https://api.github.com/users/antross/following{/other_user}","gists_url":"https://api.github.com/users/antross/gists{/gist_id}","starred_url":"https://api.github.com/users/antross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antross/subscriptions","organizations_url":"https://api.github.com/users/antross/orgs","repos_url":"https://api.github.com/users/antross/repos","events_url":"https://api.github.com/users/antross/events{/privacy}","received_events_url":"https://api.github.com/users/antross/received_events","type":"User","site_admin":false},"body":"Does this work if we have `<script>document.createElement(\"circle\")</script>` all on one line? We may need to adjust `column` in addition to `line`. This probably also means we need to account for the size of the opening script tag, e.g. in `<script type=\"text/javascript\">document.createElement(\"circle\")</script>`.","created_at":"2019-02-27T02:06:19Z","updated_at":"2019-02-27T02:11:13Z","html_url":"https://github.com/webhintio/hint/pull/1924#discussion_r260567380","pull_request_url":"https://api.github.com/repos/webhintio/hint/pulls/1924","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/webhintio/hint/pulls/comments/260567380"},"html":{"href":"https://github.com/webhintio/hint/pull/1924#discussion_r260567380"},"pull_request":{"href":"https://api.github.com/repos/webhintio/hint/pulls/1924"}}},"pull_request":{"url":"https://api.github.com/repos/webhintio/hint/pulls/1924","id":253600224,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUzNjAwMjI0","html_url":"https://github.com/webhintio/hint/pull/1924","diff_url":"https://github.com/webhintio/hint/pull/1924.diff","patch_url":"https://github.com/webhintio/hint/pull/1924.patch","issue_url":"https://api.github.com/repos/webhintio/hint/issues/1924","number":1924,"state":"open","locked":false,"title":"New: Checks if any SVG element is created using createElement()","user":{"login":"utsavized","id":1020705,"node_id":"MDQ6VXNlcjEwMjA3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1020705?v=4","gravatar_id":"","url":"https://api.github.com/users/utsavized","html_url":"https://github.com/utsavized","followers_url":"https://api.github.com/users/utsavized/followers","following_url":"https://api.github.com/users/utsavized/following{/other_user}","gists_url":"https://api.github.com/users/utsavized/gists{/gist_id}","starred_url":"https://api.github.com/users/utsavized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utsavized/subscriptions","organizations_url":"https://api.github.com/users/utsavized/orgs","repos_url":"https://api.github.com/users/utsavized/repos","events_url":"https://api.github.com/users/utsavized/events{/privacy}","received_events_url":"https://api.github.com/users/utsavized/received_events","type":"User","site_admin":false},"body":"--------------------------------------------------------------\r\n\r\nFix #1625\r\n\r\n## Pull request checklist\r\n\r\nMake sure you:\r\n\r\n- [x] Signed the [Contributor License Agreement](https://cla.js.foundation/webhintio/hint)\r\n- [x] Followed the [commit message guidelines](https://webhint.io/docs/contributor-guide/getting-started/pull-requests/#commit-messages)\r\n\r\nFor non-trivial changes, please make sure you also:\r\n\r\n- [x] Added/Updated related documentation.\r\n- [x] Added/Updated related tests.\r\n","created_at":"2019-02-16T00:07:12Z","updated_at":"2019-02-27T02:11:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8be8fc5611956898743cd8747f2863d6f26dcef5","assignee":{"login":"utsavized","id":1020705,"node_id":"MDQ6VXNlcjEwMjA3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1020705?v=4","gravatar_id":"","url":"https://api.github.com/users/utsavized","html_url":"https://github.com/utsavized","followers_url":"https://api.github.com/users/utsavized/followers","following_url":"https://api.github.com/users/utsavized/following{/other_user}","gists_url":"https://api.github.com/users/utsavized/gists{/gist_id}","starred_url":"https://api.github.com/users/utsavized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utsavized/subscriptions","organizations_url":"https://api.github.com/users/utsavized/orgs","repos_url":"https://api.github.com/users/utsavized/repos","events_url":"https://api.github.com/users/utsavized/events{/privacy}","received_events_url":"https://api.github.com/users/utsavized/received_events","type":"User","site_admin":false},"assignees":[{"login":"utsavized","id":1020705,"node_id":"MDQ6VXNlcjEwMjA3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1020705?v=4","gravatar_id":"","url":"https://api.github.com/users/utsavized","html_url":"https://github.com/utsavized","followers_url":"https://api.github.com/users/utsavized/followers","following_url":"https://api.github.com/users/utsavized/following{/other_user}","gists_url":"https://api.github.com/users/utsavized/gists{/gist_id}","starred_url":"https://api.github.com/users/utsavized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utsavized/subscriptions","organizations_url":"https://api.github.com/users/utsavized/orgs","repos_url":"https://api.github.com/users/utsavized/repos","events_url":"https://api.github.com/users/utsavized/events{/privacy}","received_events_url":"https://api.github.com/users/utsavized/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"molant","id":606594,"node_id":"MDQ6VXNlcjYwNjU5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/606594?v=4","gravatar_id":"","url":"https://api.github.com/users/molant","html_url":"https://github.com/molant","followers_url":"https://api.github.com/users/molant/followers","following_url":"https://api.github.com/users/molant/following{/other_user}","gists_url":"https://api.github.com/users/molant/gists{/gist_id}","starred_url":"https://api.github.com/users/molant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molant/subscriptions","organizations_url":"https://api.github.com/users/molant/orgs","repos_url":"https://api.github.com/users/molant/repos","events_url":"https://api.github.com/users/molant/events{/privacy}","received_events_url":"https://api.github.com/users/molant/received_events","type":"User","site_admin":false},{"login":"sarvaje","id":1581288,"node_id":"MDQ6VXNlcjE1ODEyODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1581288?v=4","gravatar_id":"","url":"https://api.github.com/users/sarvaje","html_url":"https://github.com/sarvaje","followers_url":"https://api.github.com/users/sarvaje/followers","following_url":"https://api.github.com/users/sarvaje/following{/other_user}","gists_url":"https://api.github.com/users/sarvaje/gists{/gist_id}","starred_url":"https://api.github.com/users/sarvaje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarvaje/subscriptions","organizations_url":"https://api.github.com/users/sarvaje/orgs","repos_url":"https://api.github.com/users/sarvaje/repos","events_url":"https://api.github.com/users/sarvaje/events{/privacy}","received_events_url":"https://api.github.com/users/sarvaje/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/webhintio/hint/milestones/11","html_url":"https://github.com/webhintio/hint/milestone/11","labels_url":"https://api.github.com/repos/webhintio/hint/milestones/11/labels","id":4085537,"node_id":"MDk6TWlsZXN0b25lNDA4NTUzNw==","number":11,"title":"1903-1","description":"","creator":{"login":"molant","id":606594,"node_id":"MDQ6VXNlcjYwNjU5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/606594?v=4","gravatar_id":"","url":"https://api.github.com/users/molant","html_url":"https://github.com/molant","followers_url":"https://api.github.com/users/molant/followers","following_url":"https://api.github.com/users/molant/following{/other_user}","gists_url":"https://api.github.com/users/molant/gists{/gist_id}","starred_url":"https://api.github.com/users/molant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molant/subscriptions","organizations_url":"https://api.github.com/users/molant/orgs","repos_url":"https://api.github.com/users/molant/repos","events_url":"https://api.github.com/users/molant/events{/privacy}","received_events_url":"https://api.github.com/users/molant/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":1,"state":"open","created_at":"2019-02-25T17:05:56Z","updated_at":"2019-02-27T00:26:50Z","due_on":"2019-03-11T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/webhintio/hint/pulls/1924/commits","review_comments_url":"https://api.github.com/repos/webhintio/hint/pulls/1924/comments","review_comment_url":"https://api.github.com/repos/webhintio/hint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webhintio/hint/issues/1924/comments","statuses_url":"https://api.github.com/repos/webhintio/hint/statuses/d6f84f9ec17e7ccdd26af5a7d3933626a054e21e","head":{"label":"utsavized:hint/hint-create-element-svg","ref":"hint/hint-create-element-svg","sha":"d6f84f9ec17e7ccdd26af5a7d3933626a054e21e","user":{"login":"utsavized","id":1020705,"node_id":"MDQ6VXNlcjEwMjA3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1020705?v=4","gravatar_id":"","url":"https://api.github.com/users/utsavized","html_url":"https://github.com/utsavized","followers_url":"https://api.github.com/users/utsavized/followers","following_url":"https://api.github.com/users/utsavized/following{/other_user}","gists_url":"https://api.github.com/users/utsavized/gists{/gist_id}","starred_url":"https://api.github.com/users/utsavized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utsavized/subscriptions","organizations_url":"https://api.github.com/users/utsavized/orgs","repos_url":"https://api.github.com/users/utsavized/repos","events_url":"https://api.github.com/users/utsavized/events{/privacy}","received_events_url":"https://api.github.com/users/utsavized/received_events","type":"User","site_admin":false},"repo":{"id":165313740,"node_id":"MDEwOlJlcG9zaXRvcnkxNjUzMTM3NDA=","name":"hint","full_name":"utsavized/hint","private":false,"owner":{"login":"utsavized","id":1020705,"node_id":"MDQ6VXNlcjEwMjA3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1020705?v=4","gravatar_id":"","url":"https://api.github.com/users/utsavized","html_url":"https://github.com/utsavized","followers_url":"https://api.github.com/users/utsavized/followers","following_url":"https://api.github.com/users/utsavized/following{/other_user}","gists_url":"https://api.github.com/users/utsavized/gists{/gist_id}","starred_url":"https://api.github.com/users/utsavized/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utsavized/subscriptions","organizations_url":"https://api.github.com/users/utsavized/orgs","repos_url":"https://api.github.com/users/utsavized/repos","events_url":"https://api.github.com/users/utsavized/events{/privacy}","received_events_url":"https://api.github.com/users/utsavized/received_events","type":"User","site_admin":false},"html_url":"https://github.com/utsavized/hint","description":"💡 A hinting engine for the web","fork":true,"url":"https://api.github.com/repos/utsavized/hint","forks_url":"https://api.github.com/repos/utsavized/hint/forks","keys_url":"https://api.github.com/repos/utsavized/hint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/utsavized/hint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/utsavized/hint/teams","hooks_url":"https://api.github.com/repos/utsavized/hint/hooks","issue_events_url":"https://api.github.com/repos/utsavized/hint/issues/events{/number}","events_url":"https://api.github.com/repos/utsavized/hint/events","assignees_url":"https://api.github.com/repos/utsavized/hint/assignees{/user}","branches_url":"https://api.github.com/repos/utsavized/hint/branches{/branch}","tags_url":"https://api.github.com/repos/utsavized/hint/tags","blobs_url":"https://api.github.com/repos/utsavized/hint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/utsavized/hint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/utsavized/hint/git/refs{/sha}","trees_url":"https://api.github.com/repos/utsavized/hint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/utsavized/hint/statuses/{sha}","languages_url":"https://api.github.com/repos/utsavized/hint/languages","stargazers_url":"https://api.github.com/repos/utsavized/hint/stargazers","contributors_url":"https://api.github.com/repos/utsavized/hint/contributors","subscribers_url":"https://api.github.com/repos/utsavized/hint/subscribers","subscription_url":"https://api.github.com/repos/utsavized/hint/subscription","commits_url":"https://api.github.com/repos/utsavized/hint/commits{/sha}","git_commits_url":"https://api.github.com/repos/utsavized/hint/git/commits{/sha}","comments_url":"https://api.github.com/repos/utsavized/hint/comments{/number}","issue_comment_url":"https://api.github.com/repos/utsavized/hint/issues/comments{/number}","contents_url":"https://api.github.com/repos/utsavized/hint/contents/{+path}","compare_url":"https://api.github.com/repos/utsavized/hint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/utsavized/hint/merges","archive_url":"https://api.github.com/repos/utsavized/hint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/utsavized/hint/downloads","issues_url":"https://api.github.com/repos/utsavized/hint/issues{/number}","pulls_url":"https://api.github.com/repos/utsavized/hint/pulls{/number}","milestones_url":"https://api.github.com/repos/utsavized/hint/milestones{/number}","notifications_url":"https://api.github.com/repos/utsavized/hint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/utsavized/hint/labels{/name}","releases_url":"https://api.github.com/repos/utsavized/hint/releases{/id}","deployments_url":"https://api.github.com/repos/utsavized/hint/deployments","created_at":"2019-01-11T21:38:51Z","updated_at":"2019-01-11T21:38:55Z","pushed_at":"2019-02-25T22:36:45Z","git_url":"git://github.com/utsavized/hint.git","ssh_url":"git@github.com:utsavized/hint.git","clone_url":"https://github.com/utsavized/hint.git","svn_url":"https://github.com/utsavized/hint","homepage":"https://webhint.io/","size":18897,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"webhintio:master","ref":"master","sha":"e6221bf245848bbfa6008ec1e506ad4c097ec5c2","user":{"login":"webhintio","id":25042266,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQyMjY2","avatar_url":"https://avatars0.githubusercontent.com/u/25042266?v=4","gravatar_id":"","url":"https://api.github.com/users/webhintio","html_url":"https://github.com/webhintio","followers_url":"https://api.github.com/users/webhintio/followers","following_url":"https://api.github.com/users/webhintio/following{/other_user}","gists_url":"https://api.github.com/users/webhintio/gists{/gist_id}","starred_url":"https://api.github.com/users/webhintio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webhintio/subscriptions","organizations_url":"https://api.github.com/users/webhintio/orgs","repos_url":"https://api.github.com/users/webhintio/repos","events_url":"https://api.github.com/users/webhintio/events{/privacy}","received_events_url":"https://api.github.com/users/webhintio/received_events","type":"Organization","site_admin":false},"repo":{"id":82211360,"node_id":"MDEwOlJlcG9zaXRvcnk4MjIxMTM2MA==","name":"hint","full_name":"webhintio/hint","private":false,"owner":{"login":"webhintio","id":25042266,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDQyMjY2","avatar_url":"https://avatars0.githubusercontent.com/u/25042266?v=4","gravatar_id":"","url":"https://api.github.com/users/webhintio","html_url":"https://github.com/webhintio","followers_url":"https://api.github.com/users/webhintio/followers","following_url":"https://api.github.com/users/webhintio/following{/other_user}","gists_url":"https://api.github.com/users/webhintio/gists{/gist_id}","starred_url":"https://api.github.com/users/webhintio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webhintio/subscriptions","organizations_url":"https://api.github.com/users/webhintio/orgs","repos_url":"https://api.github.com/users/webhintio/repos","events_url":"https://api.github.com/users/webhintio/events{/privacy}","received_events_url":"https://api.github.com/users/webhintio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/webhintio/hint","description":"💡 A hinting engine for the web","fork":false,"url":"https://api.github.com/repos/webhintio/hint","forks_url":"https://api.github.com/repos/webhintio/hint/forks","keys_url":"https://api.github.com/repos/webhintio/hint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webhintio/hint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webhintio/hint/teams","hooks_url":"https://api.github.com/repos/webhintio/hint/hooks","issue_events_url":"https://api.github.com/repos/webhintio/hint/issues/events{/number}","events_url":"https://api.github.com/repos/webhintio/hint/events","assignees_url":"https://api.github.com/repos/webhintio/hint/assignees{/user}","branches_url":"https://api.github.com/repos/webhintio/hint/branches{/branch}","tags_url":"https://api.github.com/repos/webhintio/hint/tags","blobs_url":"https://api.github.com/repos/webhintio/hint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webhintio/hint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webhintio/hint/git/refs{/sha}","trees_url":"https://api.github.com/repos/webhintio/hint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webhintio/hint/statuses/{sha}","languages_url":"https://api.github.com/repos/webhintio/hint/languages","stargazers_url":"https://api.github.com/repos/webhintio/hint/stargazers","contributors_url":"https://api.github.com/repos/webhintio/hint/contributors","subscribers_url":"https://api.github.com/repos/webhintio/hint/subscribers","subscription_url":"https://api.github.com/repos/webhintio/hint/subscription","commits_url":"https://api.github.com/repos/webhintio/hint/commits{/sha}","git_commits_url":"https://api.github.com/repos/webhintio/hint/git/commits{/sha}","comments_url":"https://api.github.com/repos/webhintio/hint/comments{/number}","issue_comment_url":"https://api.github.com/repos/webhintio/hint/issues/comments{/number}","contents_url":"https://api.github.com/repos/webhintio/hint/contents/{+path}","compare_url":"https://api.github.com/repos/webhintio/hint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webhintio/hint/merges","archive_url":"https://api.github.com/repos/webhintio/hint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webhintio/hint/downloads","issues_url":"https://api.github.com/repos/webhintio/hint/issues{/number}","pulls_url":"https://api.github.com/repos/webhintio/hint/pulls{/number}","milestones_url":"https://api.github.com/repos/webhintio/hint/milestones{/number}","notifications_url":"https://api.github.com/repos/webhintio/hint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webhintio/hint/labels{/name}","releases_url":"https://api.github.com/repos/webhintio/hint/releases{/id}","deployments_url":"https://api.github.com/repos/webhintio/hint/deployments","created_at":"2017-02-16T18:15:31Z","updated_at":"2019-02-27T01:30:25Z","pushed_at":"2019-02-27T01:46:02Z","git_url":"git://github.com/webhintio/hint.git","ssh_url":"git@github.com:webhintio/hint.git","clone_url":"https://github.com/webhintio/hint.git","svn_url":"https://github.com/webhintio/hint","homepage":"https://webhint.io/","size":19404,"stargazers_count":2099,"watchers_count":2099,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":138,"mirror_url":null,"archived":false,"open_issues_count":178,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":138,"open_issues":178,"watchers":2099,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webhintio/hint/pulls/1924"},"html":{"href":"https://github.com/webhintio/hint/pull/1924"},"issue":{"href":"https://api.github.com/repos/webhintio/hint/issues/1924"},"comments":{"href":"https://api.github.com/repos/webhintio/hint/issues/1924/comments"},"review_comments":{"href":"https://api.github.com/repos/webhintio/hint/pulls/1924/comments"},"review_comment":{"href":"https://api.github.com/repos/webhintio/hint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webhintio/hint/pulls/1924/commits"},"statuses":{"href":"https://api.github.com/repos/webhintio/hint/statuses/d6f84f9ec17e7ccdd26af5a7d3933626a054e21e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"antross"}}