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

Javascript: Organize imports removes alias #48070

Closed
IceSentry opened this issue Apr 17, 2018 · 1 comment
Closed

Javascript: Organize imports removes alias #48070

IceSentry opened this issue Apr 17, 2018 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues

Comments

@IceSentry
Copy link

  • VSCode Version: 1.22.2
  • OS Version: Windows 10 enterprise (1709)

Steps to Reproduce:

  1. use https://github.com/mobxjs/mobx-react-boilerplate to create a sample project
  2. in Todo.jsx change
    import { observer } from "mobx-react";
    to
    import { observer, PropTypes as mobxPropTypes } from "mobx-react";
  3. add
    const propTypes = { test: mobxPropTypes.observableArray }
    // rest of the code
    Todo.propTypes = propTypes;
  4. Organize imports

Expected behaviour:

PropTypes as mobxPropTypes is still there and works

Current behaviour:

PropTypes as mobxPropTypes is removed even if it was used

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

I use this pattern often when using mobx because I sometimes need normal PropTypes from prop-types and the PropTypes from mobx-react. Since the names are conflicting I need to use an alias, but it then gets removed by the organize imports feature.

@vscodebot vscodebot bot added the javascript JavaScript support issues label Apr 17, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Apr 17, 2018

Duplicate of #47310. Should be fixed in insiders

@mjbvz mjbvz marked this as a duplicate of #47310 Apr 17, 2018
@mjbvz mjbvz closed this as completed Apr 17, 2018
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 1, 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) javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

2 participants