{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/977","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/977/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/977/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/977/events","html_url":"https://github.com/prettier/prettier/issues/977","id":213338037,"number":977,"title":"Invalid code format","user":{"login":"montogeek","id":1002461,"avatar_url":"https://avatars3.githubusercontent.com/u/1002461?v=3","gravatar_id":"","url":"https://api.github.com/users/montogeek","html_url":"https://github.com/montogeek","followers_url":"https://api.github.com/users/montogeek/followers","following_url":"https://api.github.com/users/montogeek/following{/other_user}","gists_url":"https://api.github.com/users/montogeek/gists{/gist_id}","starred_url":"https://api.github.com/users/montogeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montogeek/subscriptions","organizations_url":"https://api.github.com/users/montogeek/orgs","repos_url":"https://api.github.com/users/montogeek/repos","events_url":"https://api.github.com/users/montogeek/events{/privacy}","received_events_url":"https://api.github.com/users/montogeek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-10T13:15:01Z","updated_at":"2017-03-10T14:20:41Z","closed_at":null,"body":"Hi!\r\n\r\nI couldn't find a similar issue, if it is a duplicate, sorry.\r\n\r\nprettier 0.22.0 is formatting this code:\r\n```js\r\nvar inherits = function (subClass, superClass) {\r\n  if (typeof superClass !== \"function\" && superClass !== null) {\r\n    throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\r\n  }\r\n\r\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\r\n    constructor: {\r\n      value: subClass,\r\n      enumerable: false,\r\n      writable: true,\r\n      configurable: true\r\n    }\r\n  });\r\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\r\n};\r\n```\r\n\r\nto\r\n```js\r\nvar inherits = function(subClass, superClass) {\r\n    if (typeof superClass !== 'function' && superClass !== null) {\r\n      throw new TypeError(\r\n        'Super expression must either be null or a function, not ' + typeof superClass,\r\n      );\r\n    }\r\n\r\n    subClass.prototype = Object.create(superClass && superClass.prototype, {\r\n      constructor: {\r\n        value: subClass,\r\n        enumerable: false,\r\n        writable: true,\r\n        configurable: true,\r\n      },\r\n    });\r\n    if (superClass)\r\n      Object.setPrototypeOf\r\n        ? Object.setPrototypeOf(subClass, superClass)\r\n        : (subClass.__proto__ = superClass);\r\n  };\r\n```\r\n```js\r\n throw new TypeError(\r\n        'Super expression must either be null or a function, not ' + typeof superClass,\r\n      );\r\n```\r\n\r\nThese lines are incorrect, causing a `Uncaught SyntaxError: Unexpected token )` error, that comma is not expected"},"comment":{"url":"https://api.github.com/repos/prettier/prettier/issues/comments/285680333","html_url":"https://github.com/prettier/prettier/issues/977#issuecomment-285680333","issue_url":"https://api.github.com/repos/prettier/prettier/issues/977","id":285680333,"user":{"login":"montogeek","id":1002461,"avatar_url":"https://avatars3.githubusercontent.com/u/1002461?v=3","gravatar_id":"","url":"https://api.github.com/users/montogeek","html_url":"https://github.com/montogeek","followers_url":"https://api.github.com/users/montogeek/followers","following_url":"https://api.github.com/users/montogeek/following{/other_user}","gists_url":"https://api.github.com/users/montogeek/gists{/gist_id}","starred_url":"https://api.github.com/users/montogeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montogeek/subscriptions","organizations_url":"https://api.github.com/users/montogeek/orgs","repos_url":"https://api.github.com/users/montogeek/repos","events_url":"https://api.github.com/users/montogeek/events{/privacy}","received_events_url":"https://api.github.com/users/montogeek/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T14:20:41Z","updated_at":"2017-03-10T14:20:41Z","body":"Actually I got this bug by mistakenly running prettier on bundle, I already make a change to only _prettierify_ src code"}}
{"actor":{"display_login":"montogeek"}}