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

Import suggestion for .vue files ends with "Vue" #82

Closed
gertqin opened this issue Mar 4, 2021 · 6 comments
Closed

Import suggestion for .vue files ends with "Vue" #82

gertqin opened this issue Mar 4, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@gertqin
Copy link

gertqin commented Mar 4, 2021

Another minor thing - the auto import suggestion for .vue files ends with Vue, e.g.

// VolarTest.vue -> 
import VolarTestVue from "./{path}/VolarTest.vue";

auto_import

I believe most people will prefer to use the filename without the "Vue" part.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 4, 2021

Thanks for report! But this is typescript correct behavior because .vue is included in import path.

In this project, typescript behavior has a higher priority than DX/UX.

@johnsoncodehk johnsoncodehk added the question Further information is requested label Mar 4, 2021
@gertqin
Copy link
Author

gertqin commented Mar 4, 2021

Ah, I didn't know that, because normally typescript doesn't suggest imports other than .ts (where the .ts ending is removed). If it is outside the scope of this project, then feel free to close the issue. :)

@Akryum
Copy link
Member

Akryum commented Jan 29, 2022

Is there a way to tell TypeScript not to add Vue?

@johnsoncodehk johnsoncodehk added wontfix This will not be worked on and removed question Further information is requested labels Apr 20, 2022
@johnsoncodehk
Copy link
Member

@Akryum see #1208 (comment).

@johnsoncodehk
Copy link
Member

I'm thinking of implementing this and making it optional.

@johnsoncodehk johnsoncodehk added enhancement New feature or request and removed wontfix This will not be worked on labels Oct 9, 2022
@lehni
Copy link

lehni commented Feb 1, 2023

Our code-base is not using any TS at all and yet this Vue suffix gets added in imports. It's pretty confusing. An option to disable this behavior would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants