镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Extra indent added after multi-line destructured assignment #19167

Description

@mjbvz

From microsoft/vscode#36248

TypeScript Version: 2.6.0-dev.20171013

Code
Format the code:

const {
    a
} = parseInt(
    '12'
)

Expected behavior:

const {
    a
} = parseInt(
    '12'
)

Actual behavior:
Extra indent added:

const {
    a
} = parseInt(
        '12'
    )

Similar to #17699

Activity

  1. added this to the milestone on Oct 16, 2017
  2. aleclarson commented on May 3, 2019

    @aleclarson

    This deserves higher priority now that typescript-tslint-plugin is affected. #31237

  3. yume-chan commented on Jun 21, 2019

    @yume-chan
    Contributor

    I can verify that this one has been fixed by #28340.

    Alec Larson (@aleclarson) your issue is slightly different so the formatter need to be adjusted case by case.

  4. mjbvz commented on Jan 29, 2020

    @mjbvz
    Author

    Confirmed as fixed in TS 3.7.5 (and likely earlier versions too as Simon Chan (@yume-chan) noted)

  5. locked as resolved and limited conversation to collaborators on Oct 21, 2025
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

    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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions