Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript organize imports conflicts with ts-lint rule ordered-imports #23888

Closed
marcelh-gh opened this issue May 4, 2018 · 3 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@marcelh-gh
Copy link

TypeScript Version: 2.9.0-dev.201xxxxx

Search Terms: organize imports, code action

The typescript feature alphabetizes imports in a way that all imports starting with a capital letter come first.
The ts-lint rule expects everything to be alphabetized just based on the letter - irrespective of capitalization.

This gets annoying when you use the ts-lint rule and also configure the TS code action to organize imports when the file gets saved.
After you use the quick-fix in VS Code to fix issues, they just get recreated as soon as you save the file.

@j-oliveras
Copy link
Contributor

You can disable auto organize imports in VS Code: https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save

@marcelh-gh
Copy link
Author

@j-oliveras you misunderstood my point. I know that and turned it on on purpose. The point is, it would be nice if ts-lint and TS organize imports would use the same method to alphabetize. ;-)

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Organize Imports Issues with the organize imports feature labels May 4, 2018
@mhegazy
Copy link
Contributor

mhegazy commented May 4, 2018

looks like a duplicate of #23366. we should use case-insensitive comparison when ordering imports..

@mhegazy mhegazy added Duplicate An existing issue was already created and removed Bug A bug in TypeScript Domain: Organize Imports Issues with the organize imports feature labels May 4, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants