Title: source.organizeImports affects export object · Issue #61588 · microsoft/TypeScript · GitHub
Open Graph Title: source.organizeImports affects export object · Issue #61588 · microsoft/TypeScript
X Title: source.organizeImports affects export object · Issue #61588 · microsoft/TypeScript
Description: Does this issue occur when all extensions are disabled?: Yes/No Yes VS Code Version: 1.99.2 (user setup) OS Version: Windows_NT x64 10.0.26100 Steps to Reproduce: With "source.OrganizeImports" = "explicit" exports of a TypeScript file ar...
Open Graph Description: Does this issue occur when all extensions are disabled?: Yes/No Yes VS Code Version: 1.99.2 (user setup) OS Version: Windows_NT x64 10.0.26100 Steps to Reproduce: With "source.OrganizeImports" = "e...
X Description: Does this issue occur when all extensions are disabled?: Yes/No Yes VS Code Version: 1.99.2 (user setup) OS Version: Windows_NT x64 10.0.26100 Steps to Reproduce: With "source.OrganizeImports&...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/61588
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"source.organizeImports affects export object","articleBody":"\u003c!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->\n\u003c!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->\n\u003c!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->\n\u003c!-- 🔎 Search existing issues to avoid creating duplicates. -->\n\u003c!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->\n\u003c!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->\n\u003c!-- 🔧 Launch with `code --disable-extensions` to check. -->\nDoes this issue occur when all extensions are disabled?: Yes/No\nYes\n\u003c!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->\n\u003c!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->\n- VS Code Version: 1.99.2 (user setup)\n- OS Version: Windows_NT x64 10.0.26100\n\nSteps to Reproduce:\n\nWith `\"source.OrganizeImports\" = \"explicit\"` exports of a TypeScript file are also affected.\nI set up an example that looks like this:\n```\nimport sample1 from './sampleImports/sample1'\nimport sample10 from './sampleImports/sample10'\nimport sample11 from './sampleImports/sample11'\nimport sample12 from './sampleImports/sample12'\nimport sample13 from './sampleImports/sample13'\nimport sample2 from './sampleImports/sample2'\nimport sample3 from './sampleImports/sample3'\nimport sample4 from './sampleImports/sample4'\nimport sample5 from './sampleImports/sample5'\nimport sample6 from './sampleImports/sample6'\nimport sample7 from './sampleImports/sample7'\nimport sample8 from './sampleImports/sample8'\nimport sample9 from './sampleImports/sample9'\n\nexport {\n sample1,\n sample2,\n sample3,\n sample4,\n sample5,\n sample6,\n sample7,\n sample8,\n sample9,\n sample10,\n sample11,\n sample12,\n sample13,\n}\n```\nWhen I add a newline and save the file it results in this:\n```\nimport sample1 from './sampleImports/sample1'\nimport sample10 from './sampleImports/sample10'\nimport sample11 from './sampleImports/sample11'\nimport sample12 from './sampleImports/sample12'\nimport sample13 from './sampleImports/sample13'\nimport sample2 from './sampleImports/sample2'\nimport sample3 from './sampleImports/sample3'\nimport sample4 from './sampleImports/sample4'\nimport sample5 from './sampleImports/sample5'\nimport sample6 from './sampleImports/sample6'\nimport sample7 from './sampleImports/sample7'\nimport sample8 from './sampleImports/sample8'\nimport sample9 from './sampleImports/sample9'\n\n\nexport {\n sample1, sample10,\n sample11,\n sample12,\n sample13, sample2,\n sample3,\n sample4,\n sample5,\n sample6,\n sample7,\n sample8,\n sample9\n}\n```\nI expect the order of the exports to be untouched.\nWe are using an EsLint Plugin to sort the exports alphabetically (which is not happy with the result of the import organization), but the issue stems from the setting. Launching VS Code without any extension produces the same result.\nThe example can be found here: https://github.com/Zitrooone/vscode-organizeImports-test\n","author":{"url":"https://github.com/Zitrooone","@type":"Person","name":"Zitrooone"},"datePublished":"2025-04-16T10:07:07Z","url":"https://github.com/microsoft/TypeScript/issues/61588"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ed6e924-0100-7e52-1ce5-2e0aca4cbafb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80E0:29FFA9:2283A79:2BAF113:6B0177E6 |
| html-safe-nonce | 8326bf00171b5fa4da3ad82edc14210b48840ff516bb6f8eb31bfb22052889af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEUwOjI5RkZBOToyMjgzQTc5OjJCQUYxMTM6NkIwMTc3RTYiLCJ2aXNpdG9yX2lkIjoiNzQzODE0MDg1NzQwNjAyNzc1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 61ffacee3c42a3c7bfc3ddf3da621c4e788ca77fb6e4b8cf66b847365aeedecf |
| hovercard-subject-tag | issue:3000808006 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/61588/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1985db792e6f8bad26c69e7c0170696909b8e2d1a87ac073af61d810f7d9f67c/microsoft/TypeScript/issues/61588 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1985db792e6f8bad26c69e7c0170696909b8e2d1a87ac073af61d810f7d9f67c/microsoft/TypeScript/issues/61588 |
| og:image:alt | Does this issue occur when all extensions are disabled?: Yes/No Yes VS Code Version: 1.99.2 (user setup) OS Version: Windows_NT x64 10.0.26100 Steps to Reproduce: With "source.OrganizeImports" = "e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Zitrooone |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width