{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/3847","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/3847/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/3847/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/3847/events","html_url":"https://github.com/prettier/prettier/issues/3847","id":293053270,"number":3847,"title":"Space after function keyword","user":{"login":"lydell","id":2142817,"avatar_url":"https://avatars3.githubusercontent.com/u/2142817?v=4","gravatar_id":"","url":"https://api.github.com/users/lydell","html_url":"https://github.com/lydell","followers_url":"https://api.github.com/users/lydell/followers","following_url":"https://api.github.com/users/lydell/following{/other_user}","gists_url":"https://api.github.com/users/lydell/gists{/gist_id}","starred_url":"https://api.github.com/users/lydell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydell/subscriptions","organizations_url":"https://api.github.com/users/lydell/orgs","repos_url":"https://api.github.com/users/lydell/repos","events_url":"https://api.github.com/users/lydell/events{/privacy}","received_events_url":"https://api.github.com/users/lydell/received_events","type":"User","site_admin":false},"labels":[{"id":707754699,"url":"https://api.github.com/repos/prettier/prettier/labels/lang:flow","name":"lang:flow","color":"006b75","default":false},{"id":707748687,"url":"https://api.github.com/repos/prettier/prettier/labels/lang:javascript","name":"lang:javascript","color":"006b75","default":false},{"id":596391935,"url":"https://api.github.com/repos/prettier/prettier/labels/lang:typescript","name":"lang:typescript","color":"006b75","default":false},{"id":516128597,"url":"https://api.github.com/repos/prettier/prettier/labels/status:needs%20discussion","name":"status:needs discussion","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-31T07:12:58Z","updated_at":"2018-02-06T04:08:58Z","closed_at":null,"author_association":"COLLABORATOR","body":"**NOTE: This issue is raised due to confusion in #1139.**\r\n\r\nThis issue is _only_ about _anonymous_ functions:\r\n\r\n```js\r\nconst identity = function (value) {\r\n  //                     ^ space here\r\n  return value;\r\n}\r\n```\r\n\r\n(Prettier currently does _not_ put a space there.)\r\n\r\n> 🗒  **NOTE:** This issue is _not_ about having a space after the function name:\r\n>\r\n> ```js\r\n> function identity (value) {\r\n>   //             ^ space here: SEE #3845!\r\n>   return value;\r\n> }\r\n> ```\r\n> \r\n> Space after function name is tracked in #3845!\r\n\r\nThe key argument is:\r\n**Consistency:** This means that there's _always_ a space after the `function` keyword.\r\n"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/363305018","html_url":"https://github.com/prettier/prettier/issues/3847#issuecomment-363305018","issue_url":"https://api.github.com/repos/prettier/prettier/issues/3847","id":363305018,"user":{"login":"alexburner","id":409114,"avatar_url":"https://avatars3.githubusercontent.com/u/409114?v=4","gravatar_id":"","url":"https://api.github.com/users/alexburner","html_url":"https://github.com/alexburner","followers_url":"https://api.github.com/users/alexburner/followers","following_url":"https://api.github.com/users/alexburner/following{/other_user}","gists_url":"https://api.github.com/users/alexburner/gists{/gist_id}","starred_url":"https://api.github.com/users/alexburner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexburner/subscriptions","organizations_url":"https://api.github.com/users/alexburner/orgs","repos_url":"https://api.github.com/users/alexburner/repos","events_url":"https://api.github.com/users/alexburner/events{/privacy}","received_events_url":"https://api.github.com/users/alexburner/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T04:08:58Z","updated_at":"2018-02-06T04:08:58Z","author_association":"NONE","body":"+1 for space after `function` keyword. [Crockford supports this](https://crockford.com/javascript/code.html):\r\n\r\n> If a function literal is anonymous, there should be one space between the word function and the ( left parenthesis. If the space is omitted, then it can appear that the function's name is function, which is an incorrect reading.\r\n"}}
{"actor":{"display_login":"alexburner"}}