Skip to content

Extra indent added after multi-line destructured assignment #19167

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

Closed
mjbvz opened this issue Oct 13, 2017 · 3 comments
Closed

Extra indent added after multi-line destructured assignment #19167

mjbvz opened this issue Oct 13, 2017 · 3 comments
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Help Wanted You can do this VS Code Tracked There is a VS Code equivalent to this issue
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Oct 13, 2017

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

@mjbvz mjbvz added Domain: Formatter The issue relates to the built-in formatter VS Code Tracked There is a VS Code equivalent to this issue labels Oct 13, 2017
@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this labels Oct 16, 2017
@mhegazy mhegazy added this to the Community milestone Oct 16, 2017
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@aleclarson
Copy link

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

@yume-chan
Copy link
Contributor

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

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

@mjbvz
Copy link
Contributor Author

mjbvz commented Jan 29, 2020

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

@mjbvz mjbvz closed this as completed Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Help Wanted You can do this VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants