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
TSLint named-imports-order and ESLint sort-imports don't order special chars (_) the same as organizeImports #37548
// ordered using vscode organizeImportsimport{HttpClientModule,HTTP_INTERCEPTORS}from'@angular/common/http';// ordered using tslint "named-imports-order": "case-insensitive" (this is the default)// also tried "lowercase-first" and "lowercase-last" - it's worseimport{HTTP_INTERCEPTORS,HttpClientModule}from'@angular/common/http';
Expected behavior:
They should sort _ the same.
Actual behavior:
TSLint seems to put _ first while organizeImports put it last. This is probably a general issue for non-alpha chars.
This is probably a general issue for non-alpha chars.
It was a problem only with the characters whose ASCII code is sandwiched between the uppercase and lowercase letters, of which only _ was a valid identifier character 😄
And yeah, it should have been fixed by #51733. Let us know if it’s not.
Activity
snebjorn commentedon Mar 2, 2023
Wonder if this is solved by Case-Insensitive Import Sorting in Editors
jakebailey commentedon Mar 2, 2023
I think so? If not, the unstable options might cover it too.
cc Andrew Branch (@andrewbranch) to confirm.
andrewbranch commentedon Mar 7, 2023
It was a problem only with the characters whose ASCII code is sandwiched between the uppercase and lowercase letters, of which only
_was a valid identifier character 😄And yeah, it should have been fixed by #51733. Let us know if it’s not.