{"action":"created","issue":{"url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/3","labels_url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/3/comments","events_url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/3/events","html_url":"https://github.com/babel-plugins/babel-plugin-object-assign/pull/3","id":89903276,"number":3,"title":"fix plugin to work well with auxiliaryComment","user":{"login":"stoeffel","id":1217681,"avatar_url":"https://avatars.githubusercontent.com/u/1217681?v=3","gravatar_id":"","url":"https://api.github.com/users/stoeffel","html_url":"https://github.com/stoeffel","followers_url":"https://api.github.com/users/stoeffel/followers","following_url":"https://api.github.com/users/stoeffel/following{/other_user}","gists_url":"https://api.github.com/users/stoeffel/gists{/gist_id}","starred_url":"https://api.github.com/users/stoeffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoeffel/subscriptions","organizations_url":"https://api.github.com/users/stoeffel/orgs","repos_url":"https://api.github.com/users/stoeffel/repos","events_url":"https://api.github.com/users/stoeffel/events{/privacy}","received_events_url":"https://api.github.com/users/stoeffel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-21T12:13:40Z","updated_at":"2015-06-23T18:19:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/pulls/3","html_url":"https://github.com/babel-plugins/babel-plugin-object-assign/pull/3","diff_url":"https://github.com/babel-plugins/babel-plugin-object-assign/pull/3.diff","patch_url":"https://github.com/babel-plugins/babel-plugin-object-assign/pull/3.patch"},"body":"Without this fix the plugin doesn't play well with `auxiliaryComment`, the output looks like this:\r\n```js\r\n// istanbul ignore next\r\n\"use strict\";\r\n\r\nexports.__esModule = true;\r\n\r\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\n```\r\nThe `auxiliaryComment` isn't before the helper function.\r\n\r\nWith this fix it is before the helper:\r\n```js\r\n\"use strict\";\r\n\r\nexports.__esModule = true;\r\n// istanbul ignore next\r\n\r\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n```\r\n\r\n\r\nThis PR also changes the plugin to have the same structure as the other [babel-plugins](https://github.com/babel-plugins)\r\n\r\nI hope this is okay for you?\r\n\r\nrefs https://github.com/1-liners/1-liners/pull/105\r\nrefs https://github.com/babel/babel/issues/1715"},"comment":{"url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/comments/114596559","html_url":"https://github.com/babel-plugins/babel-plugin-object-assign/pull/3#issuecomment-114596559","issue_url":"https://api.github.com/repos/babel-plugins/babel-plugin-object-assign/issues/3","id":114596559,"user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T18:19:28Z","updated_at":"2015-06-23T18:19:28Z","body":"Thanks @stoeffel, apologies for the delay! Merging now."}}