{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22731","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22731/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22731/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22731/events","html_url":"https://github.com/Microsoft/TypeScript/issues/22731","id":307032215,"number":22731,"title":"Organize imports moving imports before file header","user":{"login":"mjbvz","id":12821956,"avatar_url":"https://avatars2.githubusercontent.com/u/12821956?v=4","gravatar_id":"","url":"https://api.github.com/users/mjbvz","html_url":"https://github.com/mjbvz","followers_url":"https://api.github.com/users/mjbvz/followers","following_url":"https://api.github.com/users/mjbvz/following{/other_user}","gists_url":"https://api.github.com/users/mjbvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mjbvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjbvz/subscriptions","organizations_url":"https://api.github.com/users/mjbvz/orgs","repos_url":"https://api.github.com/users/mjbvz/repos","events_url":"https://api.github.com/users/mjbvz/events{/privacy}","received_events_url":"https://api.github.com/users/mjbvz/received_events","type":"User","site_admin":false},"labels":[{"id":113970366,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars2.githubusercontent.com/u/10508071?v=4","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"assignees":[{"login":"amcasey","id":10508071,"avatar_url":"https://avatars2.githubusercontent.com/u/10508071?v=4","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/68","html_url":"https://github.com/Microsoft/TypeScript/milestone/68","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/68/labels","id":3201218,"number":68,"title":"TypeScript 2.8.2","description":"","creator":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars2.githubusercontent.com/u/972891?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":5,"state":"open","created_at":"2018-03-19T22:13:23Z","updated_at":"2018-03-23T21:13:42Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2018-03-20T20:46:59Z","updated_at":"2018-03-23T21:13:42Z","closed_at":"2018-03-23T21:13:42Z","author_association":"COLLABORATOR","body":"**TypeScript Version:**  2.8.0-dev20180320\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** \r\n- Organize imports\r\n- vscode\r\n\r\n**Repo Steps**\r\n\r\n1. In the vscode source repo.\r\n1. Open `webview.ts`\r\n1. Run organize imports\r\n\r\n**Bug:**\r\n\r\nImports split around file header comment:\r\n\r\n```ts\r\nimport { addClass, addDisposableListener } from 'vs/base/browser/dom';\r\nimport { Emitter, Event } from 'vs/base/common/event';\r\nimport { IDisposable, dispose } from 'vs/base/common/lifecycle';\r\nimport { nativeSep } from 'vs/base/common/paths';\r\nimport { startsWith } from 'vs/base/common/strings';\r\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport URI from 'vs/base/common/uri';\r\nimport { IContextKey } from 'vs/platform/contextkey/common/contextkey';\r\nimport { IContextViewService } from 'vs/platform/contextview/browser/contextView';\r\nimport { IEnvironmentService } from 'vs/platform/environment/common/environment';\r\nimport { editorBackground, editorForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry';\r\nimport { DARK, ITheme, IThemeService, LIGHT } from 'vs/platform/theme/common/themeService';\r\nimport { WebviewFindWidget } from './webviewFindWidget';\r\n```\r\n\r\n```\r\n[Trace  - 13:44:19] Response received: organizeImports (5142). Request took 14 ms. Success: true \r\nResult: [\r\n    {\r\n        \"fileName\": \"/Users/matb/projects/vscode/src/vs/workbench/parts/html/electron-browser/webview.ts\",\r\n        \"textChanges\": [\r\n            {\r\n                \"start\": {\r\n                    \"line\": 1,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 7,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"import { addClass, addDisposableListener } from 'vs/base/browser/dom';\\nimport { Emitter, Event } from 'vs/base/common/event';\\nimport { IDisposable, dispose } from 'vs/base/common/lifecycle';\\nimport { nativeSep } from 'vs/base/common/paths';\\nimport { startsWith } from 'vs/base/common/strings';\\n/*---------------------------------------------------------------------------------------------\\n *  Copyright (c) Microsoft Corporation. All rights reserved.\\n *  Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\nimport URI from 'vs/base/common/uri';\\nimport { IContextKey } from 'vs/platform/contextkey/common/contextkey';\\nimport { IContextViewService } from 'vs/platform/contextview/browser/contextView';\\nimport { IEnvironmentService } from 'vs/platform/environment/common/environment';\\nimport { editorBackground, editorForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry';\\nimport { DARK, ITheme, IThemeService, LIGHT } from 'vs/platform/theme/common/themeService';\\nimport { WebviewFindWidget } from './webviewFindWidget';\\n\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 7,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 8,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 8,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 9,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 9,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 10,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 10,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 11,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 11,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 12,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 12,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 13,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 13,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 14,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 14,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 15,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 15,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 16,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 16,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 17,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            },\r\n            {\r\n                \"start\": {\r\n                    \"line\": 17,\r\n                    \"offset\": 1\r\n                },\r\n                \"end\": {\r\n                    \"line\": 18,\r\n                    \"offset\": 1\r\n                },\r\n                \"newText\": \"\"\r\n            }\r\n        ]\r\n    }\r\n]\r\n```\r\n\r\n**Playground Link:** <!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior --> \r\n\r\n**Related Issues:**\r\n"}}
{"actor":{"display_login":"weswigham"}}