Skip to content

Organize Imports should used case-insenstive sort for imports #23366

Description

@mjbvz

From Michael Bond (@MichaelRBond) on April 12, 2018 11:23

Issue Type: Bug

When running Organize Imports on the following line: import {abc, Xyz} from "./foo"; the command changes the import sort order from
abc, Xyz to Xyz, abc. This causes a tslint error, because tslint expects it to sort alphabetically regardless of case.

Steps to reproduce:

  • Run Organize Imports

Expected Result:
sorted order of imports is the same as tslints expected sort order. import { abc, Xyz } from "./foo";

VS Code version: Code 1.22.1 (950b8b0d37a9b7061b6f0d291837ccc4015f5ecd, 2018-04-06T00:21:13.607Z)
OS version: Darwin x64 17.4.0

System Info
ItemValue
CPUsIntel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)
Load (avg)4, 4, 4
Memory (System)16.00GB (1.94GB free)
Process Argv/Applications/Visual Studio Code.app/Contents/MacOS/Electron -psn_0_3691397
Screen Readerno
VM0%
Extensions (25)
ExtensionAuthor (truncated)Version
vscode-markdownlintDav0.14.1
todo-treeGru0.0.31
JSDocTagCompleteHoo0.0.2
vscode-todoMat0.8.0
vscode-dockerPet0.0.26
cformaws0.0.10
solargraphcas0.15.0
tslinteg21.0.28
json-toolseri1.0.2
vscode-emacshir0.1.1
ruby-linterhoo1.0.0
terraformmau0.0.23
prettify-jsonmoh0.0.3
pythonms-2018.3.1
azure-accountms-0.4.0
dustnem0.0.1
Rubyreb0.18.0
javared0.22.0
vscode-iconsrob7.22.0
code-spell-checkerstr1.6.6
vscode-java-debugvsc0.8.0
vscode-java-packvsc0.3.0
vscode-java-testvsc0.5.0
vscode-mavenvsc0.7.0
vscode-todo-highlightway0.5.12

(1 theme extensions excluded)

Copied from original issue: microsoft/vscode#47734

Metadata

Metadata

Labels

Domain: LS: Organize ImportsIssues with the organize imports featureFixedA PR has been merged for this issueSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions