-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed as not planned
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: LS: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureHelp WantedYou can do thisYou can do this
Milestone
Description
Bug Report
🕗 Version & Regression Information
VSCode stable & insiders
ts stable & nightly
💻 Reproduction
Create a typescript file:
import 'a';
import 'b';
import 'c';
import 'd';
//Run command Organize Imports
🙁 Actual behavior
VSCode insiders (1.71.0); built-in typescript (4.8.2); verbose
-
Request
Organize Imports{ seq: 54, type: "request", command: "organizeImports", arguments: { scope: { type: "file", args: { file: "c:/dev/bug/index.ts" } }, skipDestructiveCodeActions: false } } -
Response
Organize Imports{ seq: 0, type: "response", command: "organizeImports", request_seq: 54, success: true, body: [ { fileName: "e:/dev/bug/index.ts", textChanges: [ { start: { line: 1, offset: 1 }, end: { line: 2, offset: 1 }, newText: "import 'a';\nimport 'b';\nimport 'c';\nimport 'd';\n", }, { start: { line: 2, offset: 1 }, end: { line: 3, offset: 1 }, newText: "" }, { start: { line: 3, offset: 1 }, end: { line: 4, offset: 1 }, newText: "" }, { start: { line: 4, offset: 1 }, end: { line: 5, offset: 1 }, newText: "" }, ], }, ], } -
File update
{ seq: 55, type: "request", command: "updateOpen", arguments: { changedFiles: [ { fileName: "e:/dev/bug/index.ts", textChanges: [ { newText: "import 'b';\nimport 'c';\nimport 'd';\n", start: { line: 2, offset: 1 }, end: { line: 2, offset: 1 }, }, { newText: "", start: { line: 2, offset: 1 }, end: { line: 3, offset: 1 } }, { newText: "", start: { line: 3, offset: 1 }, end: { line: 4, offset: 1 } }, { newText: "", start: { line: 4, offset: 1 }, end: { line: 5, offset: 1 } }, ], }, ], closedFiles: [], openFiles: [], }, }
🙂 Expected behavior
- Response
Organize Imports{ seq: 0, type: "response", command: "organizeImports", request_seq: 54, success: true, body: [] }
Metadata
Metadata
Assignees
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: LS: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureHelp WantedYou can do thisYou can do this