Closed
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.