Skip to content

Some refactors don't work on new javascript files #75132

Closed

Description

@adelphes
  • VSCode Version:1,35
  • OS Version: Ubuntu 19.04 x64

Steps to Reproduce:

  • Launch a new, empty instance of VSCode
  • Create (but don't save) a new file (Untitled-1)
  • Set the language mode for the file to JavaScript (to enable the Typescript/Javascript language feature extension)
  • In the new file, type an arrow function with an unused parameter:
a => 3

Move cursor over a and from the "lightbulb" code actions, pick remove declaration from 'a' - it works;

() => 3

Now pick another code action: add braces to arrow function and nothing happens. Developer logs show:
image

Save the file (Untitled-1.js). Run the same code action again and it works:

() => {
	return 3;
}

Activity

  1. added
    javascript
    on Jun 8, 2019
  2. added
    bug
    editor-code-actions
    typescript
    on Jun 10, 2019
  3. adelphes commented on Jun 12, 2019

    @adelphes
    Author

    Hi Matt Bierner (@mjbvz) - if you're opting to close an issue marked as a bug, could you include a brief note as to why it's being closed so that I (and others) can understand the reason. - thanks.

  4. mjbvz commented on Jun 12, 2019

    @mjbvz
    Contributor

    Because it was fixed; see the linked change

    And please test in VS in vscode insiders

  5. locked and limited conversation to collaborators on Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugeditor-code-actionsjavascripttypescript

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions