{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/5245","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/5245/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/5245/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/5245/events","html_url":"https://github.com/prettier/prettier/issues/5245","id":369065265,"node_id":"MDU6SXNzdWUzNjkwNjUyNjU=","number":5245,"title":"Unstable comment in while","user":{"login":"evilebottnawi","id":4567934,"node_id":"MDQ6VXNlcjQ1Njc5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4567934?v=4","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},"labels":[{"id":520495035,"node_id":"MDU6TGFiZWw1MjA0OTUwMzU=","url":"https://api.github.com/repos/prettier/prettier/labels/area:comments","name":"area:comments","color":"fbca04","default":false},{"id":577259677,"node_id":"MDU6TGFiZWw1NzcyNTk2Nzc=","url":"https://api.github.com/repos/prettier/prettier/labels/difficulty:easy","name":"difficulty:easy","color":"0e8a16","default":false},{"id":491115806,"node_id":"MDU6TGFiZWw0OTExMTU4MDY=","url":"https://api.github.com/repos/prettier/prettier/labels/help%20wanted","name":"help wanted","color":"5319e7","default":true},{"id":707748687,"node_id":"MDU6TGFiZWw3MDc3NDg2ODc=","url":"https://api.github.com/repos/prettier/prettier/labels/lang:javascript","name":"lang:javascript","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-11T10:56:51Z","updated_at":"2018-10-12T01:47:02Z","closed_at":null,"author_association":"MEMBER","body":"**Prettier 1.14.3**\r\n[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB3AFgSwDZwBQA6UABKcTAE4CucRZxA9A8QMIQC27CMRAlMcAC+IADQgIABxiZoAZ2SgAhhQoRUABWUJ5KRQDcImACaiQAIwqKwAazgwAyhKuYoAc2SUaYl7LgUY6pau7IrIAGaK2L5iAFayAB4AQpY2dvaKXAAyLnDhkdEgThS+FMjmimYAntjQphIULjAA6sYw6MgAHAAMYvUQvk2WEmX1cCV6uWIUcACOVJjTgYrBoUgRUXBivuyYHtSbILIurrgAilQQ8HkbYjAVLUZtyABMt5Y4x2ycqyBQ0JMgKi+AAqFR0618gkEQA)\r\n```sh\r\n--parser babylon\r\n```\r\n\r\n**Input:**\r\n```jsx\r\nwhile(\r\n    true\r\n    // Comment\r\n) {}\r\n```\r\n\r\n**Output:**\r\n```jsx\r\nwhile (true) // Comment\r\n{}\r\n\r\n```\r\n\r\n**Second Output:**\r\n```jsx\r\nwhile (\r\n  true // Comment\r\n) {}\r\n\r\n```\r\n\r\n**Expected behavior:**\r\n\r\n```jsx\r\nwhile(\r\n    true\r\n    // Comment\r\n) {}\r\n```"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/429176629","html_url":"https://github.com/prettier/prettier/issues/5245#issuecomment-429176629","issue_url":"https://api.github.com/repos/prettier/prettier/issues/5245","id":429176629,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTE3NjYyOQ==","user":{"login":"jaideng123","id":5483527,"node_id":"MDQ6VXNlcjU0ODM1Mjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5483527?v=4","gravatar_id":"","url":"https://api.github.com/users/jaideng123","html_url":"https://github.com/jaideng123","followers_url":"https://api.github.com/users/jaideng123/followers","following_url":"https://api.github.com/users/jaideng123/following{/other_user}","gists_url":"https://api.github.com/users/jaideng123/gists{/gist_id}","starred_url":"https://api.github.com/users/jaideng123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaideng123/subscriptions","organizations_url":"https://api.github.com/users/jaideng123/orgs","repos_url":"https://api.github.com/users/jaideng123/repos","events_url":"https://api.github.com/users/jaideng123/events{/privacy}","received_events_url":"https://api.github.com/users/jaideng123/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T01:47:02Z","updated_at":"2018-10-12T01:47:02Z","author_association":"NONE","body":"Hey, while I was fixing this I noticed there's some inconsistency with how comments are handing between while and if statements For example:\r\n**Input:**\r\n```jsx\r\nwhile(true) // Comment\r\n{}\r\n\r\nif(true) // Comment\r\n{}\r\n```\r\n\r\n**Output :**\r\n```jsx\r\nwhile (\r\n  true // Comment\r\n) {}\r\n\r\nif (true) {\r\n  // Comment\r\n}\r\n```\r\n\r\nIs this something we should address in another issue or is it by design?"}}
{"actor":{"display_login":"jaideng123"}}