Skip to content

Formatting: space is not added in parenthesis with arrow function #15510

Description

@mjbvz

From @mlewand on April 29, 2017 14:4

  • VSCode Version: Code - Insiders 1.12.0-insider (0bec115, 2017-04-28T18:57:52.518Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions: none

Steps to Reproduce:

  1. Set a following option in your user/workspace settings:
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true
  2. Open a new file, set language to JavaScript.
  3. Paste a following snippet:
foo( () => 1 );
foo( 1 );
  1. Press ctrl/cmd+shift+f.

Expected

The code stays the way it is.

Actual

Initial space gets removed.

foo(() => 1 );
foo( 1 );

Additional Info

Checked also on a regular VSCode installation.

Copied from original issue: microsoft/vscode#25669

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterHelp WantedYou can do thisVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions