Skip to content

Format adds extra indent on jsx fragment closing tag #20651

Closed
@mjbvz

Description

@mjbvz

TypeScript Version: 2.7.0-dev.201xxxxx

Code

const frag = <>
    <p>text</p>
</>

Run format

Expected behavior:
No change. This indentation is consistent with the formatting for:

const frag = <React.Fragment>
    <p>text</p>
</React.Fragment>

Actual behavior:

const frag = <>
    <p>text</p>
    </>

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterDomain: JSX/TSXRelates to the JSX parser and emitterFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions