{"action":"closed","number":4314,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/4314","id":49392847,"html_url":"https://github.com/eslint/eslint/pull/4314","diff_url":"https://github.com/eslint/eslint/pull/4314.diff","patch_url":"https://github.com/eslint/eslint/pull/4314.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4314","number":4314,"state":"closed","locked":false,"title":"Fix: eslint.report can be called w/o node if loc provided (fixes #4220)","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"body":"Also updated docs to note that either node or loc (or both) must be supplied. Code will now throw clearer message if neither is supplied and will not throw TypeError if node is not supplied.\r\n\r\nFixes #4220.\r\n\r\nAlso, is this potentially a breaking change? I ask because it used to be impossible to report without a node, so formatters could probably implicitly assume that nodeType would be present. That is no longer the case. No tests failed so I assume the standard formatters are fine, but third-party formatters may potentially be broken with this change. Unlikely, I know, but wanted to raise the issue for your consideration.\r\n\r\nFinally, I'd like to note that there is no test file for `lib/rule-context.js`. Most of those functions are passthroughs but some are not so straightforward (e.g., `context.report` since it unfolds the object form into the positional arg form used by `eslint.report`). Should I open an issue on that?","created_at":"2015-11-02T03:54:53Z","updated_at":"2015-11-09T16:03:43Z","closed_at":"2015-11-09T16:03:43Z","merged_at":"2015-11-09T16:03:43Z","merge_commit_sha":"b60e67f6832cce496a9d8cfb29b69b7db4139389","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/4314/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/4314/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4314/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/fdfc6cd94e41c2aabfb609fcba4c9742e1cca05b","head":{"label":"platinumazure:context-report","ref":"context-report","sha":"fdfc6cd94e41c2aabfb609fcba4c9742e1cca05b","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"repo":{"id":41607614,"name":"eslint","full_name":"platinumazure/eslint","owner":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/platinumazure/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/platinumazure/eslint","forks_url":"https://api.github.com/repos/platinumazure/eslint/forks","keys_url":"https://api.github.com/repos/platinumazure/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platinumazure/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platinumazure/eslint/teams","hooks_url":"https://api.github.com/repos/platinumazure/eslint/hooks","issue_events_url":"https://api.github.com/repos/platinumazure/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/platinumazure/eslint/events","assignees_url":"https://api.github.com/repos/platinumazure/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/platinumazure/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/platinumazure/eslint/tags","blobs_url":"https://api.github.com/repos/platinumazure/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platinumazure/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platinumazure/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/platinumazure/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platinumazure/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/platinumazure/eslint/languages","stargazers_url":"https://api.github.com/repos/platinumazure/eslint/stargazers","contributors_url":"https://api.github.com/repos/platinumazure/eslint/contributors","subscribers_url":"https://api.github.com/repos/platinumazure/eslint/subscribers","subscription_url":"https://api.github.com/repos/platinumazure/eslint/subscription","commits_url":"https://api.github.com/repos/platinumazure/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/platinumazure/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/platinumazure/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/platinumazure/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/platinumazure/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/platinumazure/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platinumazure/eslint/merges","archive_url":"https://api.github.com/repos/platinumazure/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platinumazure/eslint/downloads","issues_url":"https://api.github.com/repos/platinumazure/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/platinumazure/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/platinumazure/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/platinumazure/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platinumazure/eslint/labels{/name}","releases_url":"https://api.github.com/repos/platinumazure/eslint/releases{/id}","created_at":"2015-08-29T21:19:01Z","updated_at":"2015-08-29T21:19:02Z","pushed_at":"2015-11-08T23:27:53Z","git_url":"git://github.com/platinumazure/eslint.git","ssh_url":"git@github.com:platinumazure/eslint.git","clone_url":"https://github.com/platinumazure/eslint.git","svn_url":"https://github.com/platinumazure/eslint","homepage":"http://eslint.org","size":7997,"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":"eslint:master","ref":"master","sha":"4a115f5cef5cb3605a3f650519d564b6614f8232","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"repo":{"id":11061773,"name":"eslint","full_name":"eslint/eslint","owner":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eslint/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":false,"url":"https://api.github.com/repos/eslint/eslint","forks_url":"https://api.github.com/repos/eslint/eslint/forks","keys_url":"https://api.github.com/repos/eslint/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eslint/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eslint/eslint/teams","hooks_url":"https://api.github.com/repos/eslint/eslint/hooks","issue_events_url":"https://api.github.com/repos/eslint/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/eslint/eslint/events","assignees_url":"https://api.github.com/repos/eslint/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/eslint/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/eslint/eslint/tags","blobs_url":"https://api.github.com/repos/eslint/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eslint/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eslint/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/eslint/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/eslint/eslint/languages","stargazers_url":"https://api.github.com/repos/eslint/eslint/stargazers","contributors_url":"https://api.github.com/repos/eslint/eslint/contributors","subscribers_url":"https://api.github.com/repos/eslint/eslint/subscribers","subscription_url":"https://api.github.com/repos/eslint/eslint/subscription","commits_url":"https://api.github.com/repos/eslint/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/eslint/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/eslint/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/eslint/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/eslint/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/eslint/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eslint/eslint/merges","archive_url":"https://api.github.com/repos/eslint/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eslint/eslint/downloads","issues_url":"https://api.github.com/repos/eslint/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/eslint/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/eslint/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/eslint/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eslint/eslint/labels{/name}","releases_url":"https://api.github.com/repos/eslint/eslint/releases{/id}","created_at":"2013-06-29T23:59:48Z","updated_at":"2015-11-09T13:42:51Z","pushed_at":"2015-11-09T16:03:43Z","git_url":"git://github.com/eslint/eslint.git","ssh_url":"git@github.com:eslint/eslint.git","clone_url":"https://github.com/eslint/eslint.git","svn_url":"https://github.com/eslint/eslint","homepage":"http://eslint.org","size":25429,"stargazers_count":3331,"watchers_count":3331,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":617,"mirror_url":null,"open_issues_count":191,"forks":617,"open_issues":191,"watchers":3331,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4314"},"html":{"href":"https://github.com/eslint/eslint/pull/4314"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/4314"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/4314/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4314/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4314/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/fdfc6cd94e41c2aabfb609fcba4c9742e1cca05b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"comments":11,"review_comments":3,"commits":1,"additions":149,"deletions":2,"changed_files":4}}