{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/812","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/812/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/812/events","html_url":"https://github.com/prettier/prettier/issues/812","id":210258316,"number":812,"title":"Parentheses around single parameter arrow functions / Add support for arrow-parens property","user":{"login":"DavidBabel","id":5599375,"avatar_url":"https://avatars3.githubusercontent.com/u/5599375?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBabel","html_url":"https://github.com/DavidBabel","followers_url":"https://api.github.com/users/DavidBabel/followers","following_url":"https://api.github.com/users/DavidBabel/following{/other_user}","gists_url":"https://api.github.com/users/DavidBabel/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBabel/subscriptions","organizations_url":"https://api.github.com/users/DavidBabel/orgs","repos_url":"https://api.github.com/users/DavidBabel/repos","events_url":"https://api.github.com/users/DavidBabel/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBabel/received_events","type":"User","site_admin":false},"labels":[{"id":516128597,"url":"https://api.github.com/repos/prettier/prettier/labels/Needs%20discussion","name":"Needs discussion","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":40,"created_at":"2017-02-25T20:06:36Z","updated_at":"2017-07-07T13:30:57Z","closed_at":null,"body":"Hey ! \r\n\r\nIt will be great to add an option to disable auto remove of parenthesis when there is only one argument in an arrow function.\r\nMost of professional projects configure their way since it's the default eslint behaviour.\r\nHere is a Eslint Link : \r\nhttp://eslint.org/docs/rules/arrow-parens\r\n\r\n```\r\n// Bad\r\na => {}\r\n\r\n// Good\r\n(a) => {}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/313681282","html_url":"https://github.com/prettier/prettier/issues/812#issuecomment-313681282","issue_url":"https://api.github.com/repos/prettier/prettier/issues/812","id":313681282,"user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars1.githubusercontent.com/u/17031?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongster","html_url":"https://github.com/jlongster","followers_url":"https://api.github.com/users/jlongster/followers","following_url":"https://api.github.com/users/jlongster/following{/other_user}","gists_url":"https://api.github.com/users/jlongster/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongster/subscriptions","organizations_url":"https://api.github.com/users/jlongster/orgs","repos_url":"https://api.github.com/users/jlongster/repos","events_url":"https://api.github.com/users/jlongster/events{/privacy}","received_events_url":"https://api.github.com/users/jlongster/received_events","type":"User","site_admin":false},"created_at":"2017-07-07T13:30:57Z","updated_at":"2017-07-07T13:30:57Z","body":"@rattrayalex I worry that a poll here is biased because people happy with the current behavior aren't going to be watching this issue.\r\n\r\nWhen it comes to consistency, think of it this way. One \"expression\" is allowed before the arrow. To capture a single value, you just need a single identifier. To capture multiple values, you need to wrap in parens to capture them, in a way sort of \"destructuring\". This is not unheard of, and is in fact how OCaml works (except there you literally are destructuring a tuple when getting multiple args).\r\n\r\nFor type systems, I would think that where arrow functions are used the most (inside functions) that type is already inferred. I use Flow a lot and I can't think of the last time I had to do that, honestly. Doesn't mean the issue doesn't exist though.\r\n\r\nWhen it comes down to it, we're talking about adding parens around an identifier every now and then. Are your companies going to not adopt prettier because of this? Have you gotten your coworkers to use prettier in spite of it? Usually with these kinds of things the wins are so much more than little style disagreements. It's much better for everyone if we try to coalesce on a standard style instead of adding more and more options.\r\n\r\nBefore you think that I'm just using prettier to force my personal style on other people, there have been many other changes that I disagree with. I hate the if/else syntax, where the `else ` is on the same line as the bracket: `} else {`. I hate that when objects are expanded, we don't re-collapse them if you remove properties and there's room to re-collapse. We've made changes when there is clearly an established opinion in the community. After prettier has gotten more and more adoption from large libraries without complaints (react, babel, etc), we've resisted changes more in order to reduce the style variations. A very large number of people are happy with the current style. That doesn't mean we won't change anything, but at some point we should just lay our own style preferences to rest and just do whatever prettier does. We aren't going to add as many options as elint's formatting rules, and I'm not going to maintain prettier forever."}}
{"actor":{"display_login":"jlongster"}}