{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/630","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/630/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/630/events","html_url":"https://github.com/prettier/prettier/issues/630","id":205471380,"number":630,"title":"How different from esprima + escodegen","user":{"login":"ariutta","id":1296771,"avatar_url":"https://avatars3.githubusercontent.com/u/1296771?v=3","gravatar_id":"","url":"https://api.github.com/users/ariutta","html_url":"https://github.com/ariutta","followers_url":"https://api.github.com/users/ariutta/followers","following_url":"https://api.github.com/users/ariutta/following{/other_user}","gists_url":"https://api.github.com/users/ariutta/gists{/gist_id}","starred_url":"https://api.github.com/users/ariutta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariutta/subscriptions","organizations_url":"https://api.github.com/users/ariutta/orgs","repos_url":"https://api.github.com/users/ariutta/repos","events_url":"https://api.github.com/users/ariutta/events{/privacy}","received_events_url":"https://api.github.com/users/ariutta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-06T01:39:49Z","updated_at":"2017-03-24T02:42:05Z","closed_at":"2017-02-06T01:39:52Z","body":"I searched the issues for any discussion of how this relates to the combination of [esprima](http://esprima.org/) and [escodegen](https://github.com/estools/escodegen). In case anyone else is searching for the same thing, one difference is handling of line length, as discussed in the README:\r\n\r\n### sample input\r\n```js\r\nfoo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());\r\n```\r\n\r\n### escodegen output\r\n```js\r\nfoo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());\r\n```\r\n\r\n### prettier output\r\n```js\r\nfoo(\r\n  reallyLongArg(),\r\n  omgSoManyParameters(),\r\n  IShouldRefactorThis(),\r\n  isThereSeriouslyAnotherOne()\r\n);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/288917950","html_url":"https://github.com/prettier/prettier/issues/630#issuecomment-288917950","issue_url":"https://api.github.com/repos/prettier/prettier/issues/630","id":288917950,"user":{"login":"wmhilton","id":587740,"avatar_url":"https://avatars1.githubusercontent.com/u/587740?v=3","gravatar_id":"","url":"https://api.github.com/users/wmhilton","html_url":"https://github.com/wmhilton","followers_url":"https://api.github.com/users/wmhilton/followers","following_url":"https://api.github.com/users/wmhilton/following{/other_user}","gists_url":"https://api.github.com/users/wmhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wmhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmhilton/subscriptions","organizations_url":"https://api.github.com/users/wmhilton/orgs","repos_url":"https://api.github.com/users/wmhilton/repos","events_url":"https://api.github.com/users/wmhilton/events{/privacy}","received_events_url":"https://api.github.com/users/wmhilton/received_events","type":"User","site_admin":false},"created_at":"2017-03-24T02:42:05Z","updated_at":"2017-03-24T02:42:05Z","body":"Having now tried to use `esprima` + `escodegen` for my project (thinking they might be more mature) I can list some other differences now:\r\n\r\n**esprima / escodegen discard comments by default**. There's supposed to be a way to preserve comments, but after 3 tries I still couldn't get it. *prettier worked on my first try, with no \"gotcha!\" surprises.*\r\n\r\n**esprima / escodegen are separate projects by separate people** [esprima](https://github.com/jquery/esprima) is in the `jquery` Github org, while [escodegen](https://github.com/estools/escodegen) is part of the `estools` Github org. Their APIs feel similar, but they are written and maintained by different people. (The primary author of `esprima` has only made 3 commits to `escodegen`!) It's not hard to imagine the projects getting out of sync, with `esprima` capable of parsing more types of syntax than `escodegen` can handle generating. (Which may have already happened for all I know.)"}}
{"actor":{"display_login":"wmhilton"}}