{"action":"created","comment":{"url":"https://api.github.com/repos/jlongster/prettier/pulls/comments/97173774","pull_request_review_id":17783430,"id":97173774,"diff_hunk":"@@ -197,26 +191,17 @@ obj_rest({ p: {} });\n obj_rest({ p: { q: 0, r: null } });\n \n function obj_prop_annot(\n-  {\n-    // error: boolean ~> string\n-    p = true\n-  }: { p: string } = {\n-    // error: number ~> string\n-    p: 0\n+  { p = true // error: boolean ~> string }: { p: string } = {","path":"tests/destructuring/__snapshots__/jsfmt.spec.js.snap","position":55,"original_position":55,"commit_id":"d56240390dd25d075035c19e7f7a0801f9e4f6d7","original_commit_id":"d56240390dd25d075035c19e7f7a0801f9e4f6d7","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"body":"Yeah, I have a fix for this one coming later","created_at":"2017-01-20T23:07:29Z","updated_at":"2017-01-20T23:07:29Z","html_url":"https://github.com/jlongster/prettier/pull/358#discussion_r97173774","pull_request_url":"https://api.github.com/repos/jlongster/prettier/pulls/358","_links":{"self":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/comments/97173774"},"html":{"href":"https://github.com/jlongster/prettier/pull/358#discussion_r97173774"},"pull_request":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/358"}}},"pull_request":{"url":"https://api.github.com/repos/jlongster/prettier/pulls/358","id":102552542,"html_url":"https://github.com/jlongster/prettier/pull/358","diff_url":"https://github.com/jlongster/prettier/pull/358.diff","patch_url":"https://github.com/jlongster/prettier/pull/358.patch","issue_url":"https://api.github.com/repos/jlongster/prettier/issues/358","number":358,"state":"open","locked":false,"title":"[WIP] Improve newlines/spaces detection and comments","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"body":"I'm posting this if anyone wants to look at it early. This fixes a bunch of major bugs in comments, but there are still plenty to be ironed out. \r\n\r\nAn example that fails:\r\n\r\n```js\r\nvar x = {\r\n  foo: 5,\r\n  bar: 6 // sdfsfd\r\n}\r\n```\r\n\r\nIt adds a newline:\r\n\r\n```js\r\nvar x = {\r\n  foo: 5,\r\n  bar: 6 // sdfsfd\r\n\r\n};\r\n```\r\n\r\nBut at least the number of times we emit invalid JS code should be less. I will add a lot more comments too.\r\n\r\nSee the tests, there are still more things to fix. Right now if there are inline comments, it tends to force things to be broken up because otherwise what would we do? We could try to convert them into block comments if we collapse, but that seems a lot harder.","created_at":"2017-01-20T23:02:02Z","updated_at":"2017-01-20T23:07:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"defe6f483ee273ce3515a2fd97d52c1a36f83713","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jlongster/prettier/pulls/358/commits","review_comments_url":"https://api.github.com/repos/jlongster/prettier/pulls/358/comments","review_comment_url":"https://api.github.com/repos/jlongster/prettier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jlongster/prettier/issues/358/comments","statuses_url":"https://api.github.com/repos/jlongster/prettier/statuses/d56240390dd25d075035c19e7f7a0801f9e4f6d7","head":{"label":"jlongster:fix-comments","ref":"fix-comments","sha":"d56240390dd25d075035c19e7f7a0801f9e4f6d7","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"repo":{"id":75104123,"name":"prettier","full_name":"jlongster/prettier","owner":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"private":false,"html_url":"https://github.com/jlongster/prettier","description":"Prettier is an opinionated JavaScript formatter.","fork":false,"url":"https://api.github.com/repos/jlongster/prettier","forks_url":"https://api.github.com/repos/jlongster/prettier/forks","keys_url":"https://api.github.com/repos/jlongster/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jlongster/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jlongster/prettier/teams","hooks_url":"https://api.github.com/repos/jlongster/prettier/hooks","issue_events_url":"https://api.github.com/repos/jlongster/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/jlongster/prettier/events","assignees_url":"https://api.github.com/repos/jlongster/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/jlongster/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/jlongster/prettier/tags","blobs_url":"https://api.github.com/repos/jlongster/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jlongster/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jlongster/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/jlongster/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jlongster/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/jlongster/prettier/languages","stargazers_url":"https://api.github.com/repos/jlongster/prettier/stargazers","contributors_url":"https://api.github.com/repos/jlongster/prettier/contributors","subscribers_url":"https://api.github.com/repos/jlongster/prettier/subscribers","subscription_url":"https://api.github.com/repos/jlongster/prettier/subscription","commits_url":"https://api.github.com/repos/jlongster/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/jlongster/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/jlongster/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/jlongster/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/jlongster/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/jlongster/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jlongster/prettier/merges","archive_url":"https://api.github.com/repos/jlongster/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jlongster/prettier/downloads","issues_url":"https://api.github.com/repos/jlongster/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/jlongster/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/jlongster/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/jlongster/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jlongster/prettier/labels{/name}","releases_url":"https://api.github.com/repos/jlongster/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/jlongster/prettier/deployments","created_at":"2016-11-29T17:13:37Z","updated_at":"2017-01-20T22:56:44Z","pushed_at":"2017-01-20T23:06:17Z","git_url":"git://github.com/jlongster/prettier.git","ssh_url":"git@github.com:jlongster/prettier.git","clone_url":"https://github.com/jlongster/prettier.git","svn_url":"https://github.com/jlongster/prettier","homepage":"https://jlongster.github.io/prettier/","size":3590,"stargazers_count":3925,"watchers_count":3925,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":86,"mirror_url":null,"open_issues_count":57,"forks":86,"open_issues":57,"watchers":3925,"default_branch":"master"}},"base":{"label":"jlongster:master","ref":"master","sha":"21729d8207a789c110f54d85374856aedc41126e","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"repo":{"id":75104123,"name":"prettier","full_name":"jlongster/prettier","owner":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.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},"private":false,"html_url":"https://github.com/jlongster/prettier","description":"Prettier is an opinionated JavaScript formatter.","fork":false,"url":"https://api.github.com/repos/jlongster/prettier","forks_url":"https://api.github.com/repos/jlongster/prettier/forks","keys_url":"https://api.github.com/repos/jlongster/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jlongster/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jlongster/prettier/teams","hooks_url":"https://api.github.com/repos/jlongster/prettier/hooks","issue_events_url":"https://api.github.com/repos/jlongster/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/jlongster/prettier/events","assignees_url":"https://api.github.com/repos/jlongster/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/jlongster/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/jlongster/prettier/tags","blobs_url":"https://api.github.com/repos/jlongster/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jlongster/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jlongster/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/jlongster/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jlongster/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/jlongster/prettier/languages","stargazers_url":"https://api.github.com/repos/jlongster/prettier/stargazers","contributors_url":"https://api.github.com/repos/jlongster/prettier/contributors","subscribers_url":"https://api.github.com/repos/jlongster/prettier/subscribers","subscription_url":"https://api.github.com/repos/jlongster/prettier/subscription","commits_url":"https://api.github.com/repos/jlongster/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/jlongster/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/jlongster/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/jlongster/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/jlongster/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/jlongster/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jlongster/prettier/merges","archive_url":"https://api.github.com/repos/jlongster/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jlongster/prettier/downloads","issues_url":"https://api.github.com/repos/jlongster/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/jlongster/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/jlongster/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/jlongster/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jlongster/prettier/labels{/name}","releases_url":"https://api.github.com/repos/jlongster/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/jlongster/prettier/deployments","created_at":"2016-11-29T17:13:37Z","updated_at":"2017-01-20T22:56:44Z","pushed_at":"2017-01-20T23:06:17Z","git_url":"git://github.com/jlongster/prettier.git","ssh_url":"git@github.com:jlongster/prettier.git","clone_url":"https://github.com/jlongster/prettier.git","svn_url":"https://github.com/jlongster/prettier","homepage":"https://jlongster.github.io/prettier/","size":3590,"stargazers_count":3925,"watchers_count":3925,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":86,"mirror_url":null,"open_issues_count":57,"forks":86,"open_issues":57,"watchers":3925,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/358"},"html":{"href":"https://github.com/jlongster/prettier/pull/358"},"issue":{"href":"https://api.github.com/repos/jlongster/prettier/issues/358"},"comments":{"href":"https://api.github.com/repos/jlongster/prettier/issues/358/comments"},"review_comments":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/358/comments"},"review_comment":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jlongster/prettier/pulls/358/commits"},"statuses":{"href":"https://api.github.com/repos/jlongster/prettier/statuses/d56240390dd25d075035c19e7f7a0801f9e4f6d7"}}}}
{"actor":{"display_login":"jlongster"}}