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

Auto import format #49696

Closed
ivanvoznyakovsky opened this issue May 11, 2018 · 4 comments
Closed

Auto import format #49696

ivanvoznyakovsky opened this issue May 11, 2018 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@ivanvoznyakovsky
Copy link

  • VSCode Version: 1.23.1
  • OS Version: macOS 10.13.4

Auto import format has changed to CommonJS and I do not see any config options to change it back to ES6.

Steps to Reproduce:

  1. Use some module that needs to be imported
  2. Cmd + . to open auto import suggestion and apply it
  3. Observe module is imported with a require, eg. import _ = require('lodash'); instead of import * as _ from 'lodash';

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented May 11, 2018

@mjbvz
Copy link
Contributor

mjbvz commented May 11, 2018

I can't repo this.

  • Do you see it in vscode insiders?
  • Does your project have a jsconfig or tsconfig?
  • Do you see it in a new project with only lodash installed?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label May 11, 2018
@ivanvoznyakovsky
Copy link
Author

ivanvoznyakovsky commented May 15, 2018

Does your project have a jsconfig or tsconfig?

yes, I have tsconfig

{
  "compilerOptions": {
    "allowUnusedLabels": false,
    "noEmitOnError": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "target": "es5",
    "noEmitHelpers": true,
    "importHelpers": true,
    "lib": ["dom", "es6", "es2016.array.include"],
    "baseUrl": ".",
    "paths": {
       // some project specific aliases
    }
  },
  "files": [
    "./app/app.ts"
  ]
}

Do you see it in a new project with only lodash installed?

no. now it's import _ from "lodash";

UPD

Do you see it in vscode insiders?

same as in a new project with only lodash installed with no plugins at all. import _ from "lodash";

@vscodebot vscodebot bot removed the new release label May 15, 2018
@mjbvz mjbvz closed this as completed May 23, 2018
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) javascript JavaScript support issues labels May 23, 2018
@mjbvz
Copy link
Contributor

mjbvz commented May 23, 2018

Whoops, confused the wrong issue. This problem is actually already tracked by microsoft/TypeScript#22602

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants