{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6820","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6820/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6820/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6820/events","html_url":"https://github.com/eslint/eslint/issues/6820","id":168772087,"number":6820,"title":"Rule Proposal: require-await","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"labels":[{"id":255319420,"url":"https://api.github.com/repos/eslint/eslint/labels/evaluating","name":"evaluating","color":"fef2c0","default":false},{"id":253473350,"url":"https://api.github.com/repos/eslint/eslint/labels/feature","name":"feature","color":"bfd4f2","default":false},{"id":45798639,"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"assignees":[{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2016-08-02T00:20:56Z","updated_at":"2016-10-29T21:53:42Z","closed_at":null,"body":"Async functions and await expressions arrived stage 4.\r\nWe can add the rule for those after our parser supported those.\r\n\r\nThis proposal is the `await` version of [require-yield](http://eslint.org/docs/rules/require-yield) rule.\r\nIt disallows async functions without await expressions.\r\n\r\n```js\r\n/*eslint require-await: error*/\r\n\r\n//------------------------------------------------------------------------------\r\n// ✔ GOOD\r\nasync function foo() {\r\n    await doSomething()\r\n}\r\n\r\nasync function foo() {\r\n    // do nothing.\r\n}\r\n\r\n//------------------------------------------------------------------------------\r\n// ✘ BAD\r\nasync function foo() {\r\n    doSomething()\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/257118217","html_url":"https://github.com/eslint/eslint/issues/6820#issuecomment-257118217","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6820","id":257118217,"user":{"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},"created_at":"2016-10-29T21:53:42Z","updated_at":"2016-10-29T21:53:42Z","body":"@ljharb that's fair, there is a distinction that isn't immediately obvious.\r\n\r\n>  I think having the rule would actually cause a lot of harm by discouraging people from adding these guarantees to their promise-returning functions.\r\n\r\nI can't buy the argument that having a non-default rule available actively harms anyone. There are definitely arguments for not enabling the rule, but I don't see a good argument for not having the rule at all. \r\n\r\nI'd still bet that most people using `async` functions in most cases will do so with the intent of using `await`. For those who do not, then they just won't enable the rule."}}
{"actor":{"display_login":"nzakas"}}