{"action":"created","comment":{"url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/comments/333850343","pull_request_review_id":300498305,"id":333850343,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMzg1MDM0Mw==","diff_hunk":"@@ -0,0 +1,58 @@\n+# Enforce using `yield*` to delegate to other sagas\r\n+# saga-direct-delegation\r\n+\r\n+This rule enforces that delegation to sagas is done directly using `yield*`, rather than indirectly by plain `yield` of the returned iterator to the saga middleware.\r\n+\r\n+This has the benefit of maintaining the delegator (caller) on the call stack, which aids debugging and gives better error stack traces.\r\n+\r\n+The rule is autofixable.\r\n+\r\n+## Examples of incorrect code for this rule:\r\n+\r\n+❌ Delegations not using `yield*`, where the callee is in the same file and accessed by identifier\r\n+\r\n+```js\r\n+/* eslint saxo/saga-direct-delegation: \"error\" */\r\n+function* delegate() {}\r\n+\r\n+function* caller() {\r\n+    yield delegate();\r\n+}\r\n+```\r\n+\r\n+## Examples of correct code for this rule:\r\n+\r\n+✅ Delegations not using `yield*`, where the callee is imported from from another file\r\n+\r\n+```js\r\n+/* eslint saxo/saga-direct-delegation: \"error\" */\r\n+import delegate from './sagas';\r\n+\r\n+function* caller() {\r\n+    yield delegate();\r\n+}\r\n+```\r\n+\r\n+✅ Delegations not using `yield*`, where the callee is not accessed by identifier\r\n+\r\n+```js\r\n+/* eslint saxo/saga-direct-delegation: \"error\" */\r\n+const obj = {\r\n+    delegate: function* () {}\r\n+};\r\n+\r\n+function* caller() {\r\n+    yield obj.delegate();\r","path":"docs/rules/saga-direct-delegation.md","position":45,"original_position":45,"commit_id":"063b230988b0cf76a8d05d98355e61b4a7957a53","original_commit_id":"e89fd3df044417769fc65c9f0ebb05d1c7179359","user":{"login":"robatwilliams","id":3041926,"node_id":"MDQ6VXNlcjMwNDE5MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3041926?v=4","gravatar_id":"","url":"https://api.github.com/users/robatwilliams","html_url":"https://github.com/robatwilliams","followers_url":"https://api.github.com/users/robatwilliams/followers","following_url":"https://api.github.com/users/robatwilliams/following{/other_user}","gists_url":"https://api.github.com/users/robatwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/robatwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robatwilliams/subscriptions","organizations_url":"https://api.github.com/users/robatwilliams/orgs","repos_url":"https://api.github.com/users/robatwilliams/repos","events_url":"https://api.github.com/users/robatwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/robatwilliams/received_events","type":"User","site_admin":false},"body":"Actually, on that last paragraph, thinking of some of the things eslint-plugin-import can do, it might be possible to do this properly rather than what I described. I'll have a look at how that plugin works sometime in the future.","created_at":"2019-10-11T07:02:30Z","updated_at":"2019-10-11T07:02:31Z","html_url":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15#discussion_r333850343","pull_request_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/comments/333850343"},"html":{"href":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15#discussion_r333850343"},"pull_request":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15"}},"in_reply_to_id":332827393},"pull_request":{"url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15","id":325750795,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI1NzUwNzk1","html_url":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15","diff_url":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15.diff","patch_url":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15.patch","issue_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/15","number":15,"state":"open","locked":false,"title":"New rule: saga-direct-delegation using yield*","user":{"login":"robatwilliams","id":3041926,"node_id":"MDQ6VXNlcjMwNDE5MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3041926?v=4","gravatar_id":"","url":"https://api.github.com/users/robatwilliams","html_url":"https://github.com/robatwilliams","followers_url":"https://api.github.com/users/robatwilliams/followers","following_url":"https://api.github.com/users/robatwilliams/following{/other_user}","gists_url":"https://api.github.com/users/robatwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/robatwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robatwilliams/subscriptions","organizations_url":"https://api.github.com/users/robatwilliams/orgs","repos_url":"https://api.github.com/users/robatwilliams/repos","events_url":"https://api.github.com/users/robatwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/robatwilliams/received_events","type":"User","site_admin":false},"body":"For internal PR 48195 - @jumoel \r\n\r\nCredit to @bobrippling for the [initial POC](https://astexplorer.net/#/gist/6580f2e8e4eeeedd973ca1ed57abe505/2a5bedf15f04efde30544a9f071ea5a00ca963d3) on ASTExplorer.","created_at":"2019-10-08T12:37:37Z","updated_at":"2019-10-11T07:02:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60c74480c406cd241544d892a256fc594e34cc99","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15/commits","review_comments_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15/comments","review_comment_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/15/comments","statuses_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/statuses/063b230988b0cf76a8d05d98355e61b4a7957a53","head":{"label":"robatwilliams:rule-saga-delegation","ref":"rule-saga-delegation","sha":"063b230988b0cf76a8d05d98355e61b4a7957a53","user":{"login":"robatwilliams","id":3041926,"node_id":"MDQ6VXNlcjMwNDE5MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3041926?v=4","gravatar_id":"","url":"https://api.github.com/users/robatwilliams","html_url":"https://github.com/robatwilliams","followers_url":"https://api.github.com/users/robatwilliams/followers","following_url":"https://api.github.com/users/robatwilliams/following{/other_user}","gists_url":"https://api.github.com/users/robatwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/robatwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robatwilliams/subscriptions","organizations_url":"https://api.github.com/users/robatwilliams/orgs","repos_url":"https://api.github.com/users/robatwilliams/repos","events_url":"https://api.github.com/users/robatwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/robatwilliams/received_events","type":"User","site_admin":false},"repo":{"id":213605960,"node_id":"MDEwOlJlcG9zaXRvcnkyMTM2MDU5NjA=","name":"eslint-plugin-saxo","full_name":"robatwilliams/eslint-plugin-saxo","private":false,"owner":{"login":"robatwilliams","id":3041926,"node_id":"MDQ6VXNlcjMwNDE5MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3041926?v=4","gravatar_id":"","url":"https://api.github.com/users/robatwilliams","html_url":"https://github.com/robatwilliams","followers_url":"https://api.github.com/users/robatwilliams/followers","following_url":"https://api.github.com/users/robatwilliams/following{/other_user}","gists_url":"https://api.github.com/users/robatwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/robatwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robatwilliams/subscriptions","organizations_url":"https://api.github.com/users/robatwilliams/orgs","repos_url":"https://api.github.com/users/robatwilliams/repos","events_url":"https://api.github.com/users/robatwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/robatwilliams/received_events","type":"User","site_admin":false},"html_url":"https://github.com/robatwilliams/eslint-plugin-saxo","description":null,"fork":true,"url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo","forks_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/forks","keys_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/teams","hooks_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/hooks","issue_events_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/issues/events{/number}","events_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/events","assignees_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/assignees{/user}","branches_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/branches{/branch}","tags_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/tags","blobs_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/git/refs{/sha}","trees_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/statuses/{sha}","languages_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/languages","stargazers_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/stargazers","contributors_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/contributors","subscribers_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/subscribers","subscription_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/subscription","commits_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/commits{/sha}","git_commits_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/git/commits{/sha}","comments_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/comments{/number}","issue_comment_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/issues/comments{/number}","contents_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/contents/{+path}","compare_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/merges","archive_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/downloads","issues_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/issues{/number}","pulls_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/pulls{/number}","milestones_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/milestones{/number}","notifications_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/labels{/name}","releases_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/releases{/id}","deployments_url":"https://api.github.com/repos/robatwilliams/eslint-plugin-saxo/deployments","created_at":"2019-10-08T09:49:58Z","updated_at":"2019-10-08T09:50:00Z","pushed_at":"2019-10-10T20:12:40Z","git_url":"git://github.com/robatwilliams/eslint-plugin-saxo.git","ssh_url":"git@github.com:robatwilliams/eslint-plugin-saxo.git","clone_url":"https://github.com/robatwilliams/eslint-plugin-saxo.git","svn_url":"https://github.com/robatwilliams/eslint-plugin-saxo","homepage":null,"size":115,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SaxoBank:master","ref":"master","sha":"0a2ed091ba3ea3bbbfc6821e7ab95a72ea09f9c3","user":{"login":"SaxoBank","id":527181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyNzE4MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/527181?v=4","gravatar_id":"","url":"https://api.github.com/users/SaxoBank","html_url":"https://github.com/SaxoBank","followers_url":"https://api.github.com/users/SaxoBank/followers","following_url":"https://api.github.com/users/SaxoBank/following{/other_user}","gists_url":"https://api.github.com/users/SaxoBank/gists{/gist_id}","starred_url":"https://api.github.com/users/SaxoBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaxoBank/subscriptions","organizations_url":"https://api.github.com/users/SaxoBank/orgs","repos_url":"https://api.github.com/users/SaxoBank/repos","events_url":"https://api.github.com/users/SaxoBank/events{/privacy}","received_events_url":"https://api.github.com/users/SaxoBank/received_events","type":"Organization","site_admin":false},"repo":{"id":113028200,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMwMjgyMDA=","name":"eslint-plugin-saxo","full_name":"SaxoBank/eslint-plugin-saxo","private":false,"owner":{"login":"SaxoBank","id":527181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyNzE4MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/527181?v=4","gravatar_id":"","url":"https://api.github.com/users/SaxoBank","html_url":"https://github.com/SaxoBank","followers_url":"https://api.github.com/users/SaxoBank/followers","following_url":"https://api.github.com/users/SaxoBank/following{/other_user}","gists_url":"https://api.github.com/users/SaxoBank/gists{/gist_id}","starred_url":"https://api.github.com/users/SaxoBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaxoBank/subscriptions","organizations_url":"https://api.github.com/users/SaxoBank/orgs","repos_url":"https://api.github.com/users/SaxoBank/repos","events_url":"https://api.github.com/users/SaxoBank/events{/privacy}","received_events_url":"https://api.github.com/users/SaxoBank/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SaxoBank/eslint-plugin-saxo","description":null,"fork":false,"url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo","forks_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/forks","keys_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/teams","hooks_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/hooks","issue_events_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/events{/number}","events_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/events","assignees_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/assignees{/user}","branches_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/branches{/branch}","tags_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/tags","blobs_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/git/refs{/sha}","trees_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/statuses/{sha}","languages_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/languages","stargazers_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/stargazers","contributors_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/contributors","subscribers_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/subscribers","subscription_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/subscription","commits_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/commits{/sha}","git_commits_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/git/commits{/sha}","comments_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/comments{/number}","issue_comment_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/comments{/number}","contents_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/contents/{+path}","compare_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/merges","archive_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/downloads","issues_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues{/number}","pulls_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls{/number}","milestones_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/milestones{/number}","notifications_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/labels{/name}","releases_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/releases{/id}","deployments_url":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/deployments","created_at":"2017-12-04T10:22:58Z","updated_at":"2019-10-08T11:49:04Z","pushed_at":"2019-10-10T20:12:41Z","git_url":"git://github.com/SaxoBank/eslint-plugin-saxo.git","ssh_url":"git@github.com:SaxoBank/eslint-plugin-saxo.git","clone_url":"https://github.com/SaxoBank/eslint-plugin-saxo.git","svn_url":"https://github.com/SaxoBank/eslint-plugin-saxo","homepage":null,"size":107,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":6,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15"},"html":{"href":"https://github.com/SaxoBank/eslint-plugin-saxo/pull/15"},"issue":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/15"},"comments":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/SaxoBank/eslint-plugin-saxo/statuses/063b230988b0cf76a8d05d98355e61b4a7957a53"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"robatwilliams"}}