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

📎 Integrate lint/useGroupedTypeImport in organizeImports #551

Closed
Conaclos opened this issue Oct 19, 2023 · 6 comments
Closed

📎 Integrate lint/useGroupedTypeImport in organizeImports #551

Conaclos opened this issue Oct 19, 2023 · 6 comments
Labels
A-Analyzer Area: analyzer A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@Conaclos
Copy link
Member

Description

useGroupedTypeImport allows factorizing type imports:

- import { type A, type B } from ""
+ import type { A, B } from ""

This behavior should be integrated into organize-imports action.

@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Oct 19, 2023
@ematipico
Copy link
Member

I'm not sure this should be part of the import sorting. Is there a good reason for doing that?

Are there other tools that do that? If so how?

Cargo for example doesn't join imports.

@Conaclos
Copy link
Member Author

Conaclos commented Oct 20, 2023

Actually, you are the one who proposed it 😅
I have no strong opinions about that...

Are there other tools that do that? If so how?

Factorizing type modifier? Not sure I have to check.

Cargo for example doesn't join imports.

Do you mean merging distinct import statements? This is not the point of this issue. However, I think it is a good thing of merging imports because typescript is doing that.

@ematipico
Copy link
Member

Past ematipico was wise 😆 and present ematipico is grampy. Feel free to ignore my present comment.

Do you mean #454? This is not the point of this issue.

No, I wondered why they don't do that since rust is a side-effect-free language so that they can merge imports without possible repercussions. Simply that.

@ematipico ematipico added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Analyzer Area: analyzer labels Mar 4, 2024
@emab
Copy link
Contributor

emab commented Apr 21, 2024

Can I look into this one?

Edit: have seen that this is extending the existing rule. Looks fairly complex already but will have a look, maybe best not to assign until I'm sure I'm able to help here 🙂

Edit2: yep not sure I can handle this one! I'll throw my hat into the ring elsewhere.

@Conaclos
Copy link
Member Author

Hi @emab, I will work on #817 in the coming days. I am afraid our works may lead to Git conflict. I will come back here once I addressed #817.

@Conaclos
Copy link
Member Author

Conaclos commented Jul 8, 2024

Closing in favor of #3015

@Conaclos Conaclos closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analyzer Area: analyzer A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

3 participants