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

Auto sort import conflicts with tslint #26685

Closed
rrousselGit opened this issue Aug 27, 2018 · 2 comments
Closed

Auto sort import conflicts with tslint #26685

rrousselGit opened this issue Aug 27, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@rrousselGit
Copy link

rrousselGit commented Aug 27, 2018

I've seen the related issue:

and tested it on the current typescript next (3.1.0-dev.20180825). But the current fix seems to be incomplete.

Code

import { helloWorld, HELLO_WORLD } from 'foo';

Expected behavior:

Using "Organize imports", this should become

import { HELLO_WORLD, helloWorld } from 'foo';

due to the _ in the naming. As this is the expected behavior of tslint ordered-imports

Actual behavior:

Imports are not reordered.
Worse, if you have the code following code which fits tslint rules:

import {  HELLO_WORLD, helloWorld } from 'foo';

then "Organize imports" will revert it back


For now I added a // tslint:disable-next-line:ordered-imports but this is not ideal.

@j-oliveras
Copy link
Contributor

Duplicated of #25114?

@rrousselGit
Copy link
Author

Oh, didn't see that one. Gotcha

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants