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

Disable autoimport on JS/TS files by default #38911

Closed
alirobe opened this issue Nov 22, 2017 · 3 comments
Closed

Disable autoimport on JS/TS files by default #38911

alirobe opened this issue Nov 22, 2017 · 3 comments
Assignees

Comments

@alirobe
Copy link

alirobe commented Nov 22, 2017

  • VSCode Version: 1.18.1
  • OS Version: Windows 10 1709

Steps to Reproduce:

  1. use setTimeout in a large javascript file that didn't use it before.
  2. import { setTimeout } from "timers"; is added to top of file, without any notification, question, prompt, warning, or visible change on screen.

This is an absolutely terrible default, it's unclear the change to my code is happening, as it's not even visible on the screen. It breaks my code. Like most people, I am migrating to TypeScript, not using it exclusively. Some of my code is not compiled before being shipped. This just confuses browsers, and I don't want it.

This whole feature should be removed until a better UX can be implemented. As a general rule, a code editor doesn't mess with code like this. It isn't your job to be writing my code for me. If I wanted this thing to behave like an IDE, I'd use an IDE. This behavior change is entirely unexpected for an editor. It breaks our workflow. Either ask me before making changes, or stop making changes I can't see.

@alirobe alirobe changed the title Disable autoimport by default Disable autoimport on JS/TS files by default Nov 22, 2017
@ssamuli
Copy link

ssamuli commented Nov 22, 2017

I agree with @alirobe, it is an awful default.

In case anyone else is ending up here from google, looking for ways to disable it, just put this in your settings:

"typescript.autoImportSuggestions.enabled": false

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 27, 2017

Duplicate of #38551

As already covered, you can disable this by setting: "typescript.autoImportSuggestions.enabled": false. If you are seeing bugs with auto-import behavior or have ideas on how the UX could be improved, please file new issues

@mjbvz mjbvz closed this as completed Nov 27, 2017
@alirobe
Copy link
Author

alirobe commented Nov 28, 2017

@mjbvz this is not a duplicate, it's a UX improvement idea.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants