You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding an import with quick fix should respect sort order #16119
import{A,C}from"./letters";constb: B=newB();// suggestion to import B from "./letters";
After:
import{A,C,B}from"./letters";// TSLint's ordered-import rule is now offering a quick fixconstb: B=newB();
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.
Reacted by Rory Pasley, Ghabriel Nunes, João Dias and Michele Bonazza
Activity
JoshuaKGoldberg commentedon Mar 29, 2021
IME this has since been resolved. Thanks!