Skip to content

Make adding semicolon configurable for "Extract function" #18780

Description

@mjbvz

From @davedmarketing on September 24, 2017 17:53

  • VSCode Version: (1.16.1)
  • OS Version: OSX 10.11.6

Steps to Reproduce:

When I use "Extract function" it automatically adds ";". I don't use ";" when writing javascript except for inline "line breaks" or in front of self-executing functions so this causes a discrepancy.

Reproduces without extensions: Yes/No

Copied from original issue: microsoft/vscode#34911

Activity

  1. changed the title [-]How to remove automatically added ";" from "Extract function"[/-] [+]Make adding semicolon configurable for "Extract function"[/+] on Sep 26, 2017
  2. mjbvz commented on Nov 16, 2017

    @mjbvz
    Author

    May fall within scope of #19882

  3. mjbvz commented on Aug 12, 2019

    @mjbvz
    Author

    Just a heads up Andrew Branch (@andrewbranch), I did a quick test on this issue it looks like this was not fixed by your work on #19882

    Here's a quick repo that triggers the detector not to use semicolon for auto imports:

    console.log(1)
    console.log(2)
    console.log(3)
    console.log(4)
    console.log(5)
    console.log(6)
    
    console.log(1 + 2) // extract `1 + 2` here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: LS: Refactoringse.g. extract to constant or function, rename symbolSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions