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

Side-effect import not sorted properly with @typescript-eslint 2.23.0 #39

Closed
Livven opened this issue Mar 11, 2020 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@Livven
Copy link

Livven commented Mar 11, 2020

This is with "eslint-plugin-simple-import-sort": "5.0.1".

Before (i.e. 2.22.0):

import "hard-rejection/register";

import chalk from "chalk";
import dotenv from "dotenv";
import ora from "ora";
import pluralize from "pluralize";

After:

import chalk from "chalk";
import dotenv from "dotenv";
import "hard-rejection/register";
import ora from "ora";
import pluralize from "pluralize";

Here's the changelog. Seems most likely to be caused by (completely uneducated guess) typescript-eslint/typescript-eslint#1697?

@lydell lydell added the bug Something isn't working label Mar 11, 2020
@brandon-leapyear
Copy link

brandon-leapyear commented Mar 11, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Possibly fixed with #35

@brandon-leapyear
Copy link

brandon-leapyear commented Mar 11, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Seems like this broke it, by setting a default for importKind:

https://github.com/typescript-eslint/typescript-eslint/pull/1697/files#diff-68b2b0b0d2d0ff1846b1114472008332R1536

https://github.com/chimurai/eslint-plugin-simple-import-sort/blob/master/src/sort.js#L842

@lydell lydell closed this as completed in 8bb04a0 Mar 11, 2020
@lydell
Copy link
Owner

lydell commented Mar 11, 2020

Fixed in 5.0.2. Thanks for the help!

@Livven
Copy link
Author

Livven commented Mar 17, 2020

Confirmed working for me, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants