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

Organize imports command removes non-alias import #49724

Closed
alejandroiglesias opened this issue May 11, 2018 · 5 comments
Closed

Organize imports command removes non-alias import #49724

alejandroiglesias opened this issue May 11, 2018 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@alejandroiglesias
Copy link

alejandroiglesias commented May 11, 2018

Issue Type: Bug

I know this seems a duplicate issue, but running the Organize Imports command removes this import:

import CodeMirror from 'codemirror';

The other reports I saw were related to aliasing an import (import {a as b} from 'a';), so this seems something different. Also, the import is being used.

VS Code version: Code 1.23.1 (d0182c3, 2018-05-10T16:03:31.083Z)
OS version: Darwin x64 16.7.0

Extensions (22)
Extension Author (truncated) Version
EditorConfig Edi 0.12.1
vscode-github Kni 0.28.1
vscode-eslint dba 1.4.8
tslint eg2 1.0.28
prettier-vscode esb 1.3.1
Angular1 joh 0.2.0
rainbow-csv mec 0.2.1
dotenv mik 1.0.1
ecdc mit 0.12.0
vscode-attrs-sorter mrm 2.1.0
vscode-doiuse mrm 1.5.0
vscode-lebab mrm 2.5.0
vscode-postcss-sorting mrm 3.0.1
vscode-scss mrm 0.6.2
vscode-cosmosdb ms- 0.7.1
azure-account ms- 0.4.0
debugger-for-chrome msj 4.4.3
vscode-sort-json ric 1.11.0
annotator ryu 0.11.0
linter-xo sam 2.1.3
language-stylus sys 1.9.2
vscode-meteor vuh 0.1.1
@vscodebot
Copy link

vscodebot bot commented May 11, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@mjbvz
Copy link
Collaborator

mjbvz commented May 11, 2018

Please show how the import is being used in your file

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

alejandroiglesias commented May 11, 2018

@mjbvz a few lines below the import:

Object.assign(window, { CodeMirror });

The parser may be failing to detect the new property value shorthand.

@mjbvz
Copy link
Collaborator

mjbvz commented May 11, 2018

Thanks. This is a duplicate of #49193

It is fixed in vscode insiders

@mjbvz mjbvz closed this as completed May 11, 2018
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels May 11, 2018
@alejandroiglesias
Copy link
Author

@mjbvz thank you for the update.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants