-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Editor-provided fixes, often called code actions.
Milestone
Description
TypeScript Version: 2.3
Code
Before the suggested B
import is added:
import { A, C } from "./letters";
const b: B = new B(); // suggestion to import B from "./letters";
After:
import { A, C, B } from "./letters"; // TSLint's ordered-import rule is now offering a quick fix
const b: B = new B();
Expected behavior:
If the imports are sorted, adding a new one should add in sorted order. In this case it would be { A, B, C }
.
Actual behavior:
The added import is tacked onto the end.
If the preference for keeping imports sorted will be added in #10020, it seems like it would make sense to respect that order in individual adds as well.
Paz23, Ghabriel, alfaproject and micheleb
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Editor-provided fixes, often called code actions.