{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/24324","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/24324/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/24324/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/24324/events","html_url":"https://github.com/Microsoft/TypeScript/issues/24324","id":325398497,"number":24324,"title":"source.organizeImports must not remove empty line between import","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":113971226,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Duplicate","name":"Duplicate","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-22T17:46:36Z","updated_at":"2018-05-22T18:40:10Z","closed_at":null,"author_association":"COLLABORATOR","body":"_From @nikolay-borzov on May 22, 2018 12:37_\n\n<!--\r\nDo you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode.\r\n\r\nFor bug reports, please fill in the details below. For feature requests, please describe the desired feature.\r\n-->\r\n\r\nUsually imports are organized in groups separated by empty line (e.g. node packages, services, components). I think that `organizeImports` should respect existing groups and perform organizing within each group.\r\n\r\n<!-- Use Help > Report Issue to prefill these. -->\r\n- VSCode Version: 1.23.1\r\n- OS Version: Windows 10 x64\r\n\r\nSteps to Reproduce:\r\n\r\n1. Set user settings:\r\n```\r\n\"editor.formatOnSave\": true,\r\n\"editor.codeActionsOnSave\": {\r\n  source.organizeImports\": true\r\n}\r\n```\r\n2. Create `.ts` file\r\n```\r\nimport path from 'path'\r\n\r\nimport fs from 'fs'\r\n\r\nconst currentDir = path.resolve(__dirname)\r\nconst data = fs.readdirSync(currentDir)\r\n```\r\n\r\n3. Press `Ctrl+S`\r\n\r\n4. Result:\r\n```\r\nimport fs from 'fs'\r\nimport path from 'path'\r\n\r\nconst currentDir = path.resolve(__dirname)\r\nconst data = fs.readdirSync(currentDir)\r\n```\r\n\r\n<!-- Launch with `code --disable-extensions` to check. -->\r\nDoes this issue occur when all extensions are disabled?: Yes (Disabled TSLint and Prettier)\r\n\n\n_Copied from original issue: Microsoft/vscode#50277_"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/391097654","html_url":"https://github.com/Microsoft/TypeScript/issues/24324#issuecomment-391097654","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/24324","id":391097654,"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},"created_at":"2018-05-22T18:40:10Z","updated_at":"2018-05-22T18:40:10Z","author_association":"COLLABORATOR","body":"I believe #22914 tracks removing the newlines while this issue is about preserving the newlines and the import groups they define"}}
{"actor":{"display_login":"mjbvz"}}