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

TS AutoImport style config enhancement #20161

Closed
mjbvz opened this issue Nov 20, 2017 · 4 comments
Closed

TS AutoImport style config enhancement #20161

mjbvz opened this issue Nov 20, 2017 · 4 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 20, 2017

From @bradzacher on November 20, 2017 4:9

I love the new TS autoimport, saves so much time having to manually type out imports, also getting auto complete for things not even in your file is amazing.

That being said, a few configuration options would be nice:

  • Our style guide means no semicolons, but the code automatically adds one (so I have to cursor up to delete it).
  • Additionally our style guide also calls for absolute imports to come before relative ones, but code just places it at the end (so I have to go and move it manually).

Copied from original issue: microsoft/vscode#38743

@mjbvz mjbvz self-assigned this Nov 20, 2017
@mjbvz mjbvz removed their assignment Nov 20, 2017
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Nov 20, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Nov 20, 2017

Semicolon part tracked by #19882

@mhegazy mhegazy added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Nov 20, 2017
@alextreppass
Copy link

alextreppass commented May 15, 2018

Hi @mjbvz, will this also allow configuring autoimports to be absolute (relative to baseUri), instead of always relative (../../...)?

Related:
#21860
#22249

These have been marked as closed / fixed, but it's not clear where the path fix & option come into play:
#20619
microsoft/vscode#45948

Thanks

@mhegazy
Copy link
Contributor

mhegazy commented May 15, 2018

will this also allow configuring autoimports to be absolute (relative to baseUri), instead of always relative

This is available in TS 2.9 (VSCode insiders as of now). use "typescript.preferences.importModuleSpecifier": "non-relative"

@mjbvz
Copy link
Contributor Author

mjbvz commented Jan 28, 2020

Closing this as both of the issues have been addressed by the following VS Code settings:

  • javascript.format.semicolons / typescript.format.semicolons for semicolons (auto imports also try to infer this now.
  • javascript.preferences.importModuleSpecifier / typescript.preferences.importModuleSpecifier for import style (relative vs absolute)

@mjbvz mjbvz closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants