Skip to content

Format should indent JSX fragment children #20650

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 Dec 12, 2017 · 0 comments
Closed

Format should indent JSX fragment children #20650

mjbvz opened this issue Dec 12, 2017 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Dec 12, 2017

TypeScript Version: 2.7.0-dev.20171208

Code

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

Run Format

Expected behavior:
Child is indented:

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

This is consistent with what we do for:

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

Actual behavior:
No change. Child will be de-indented if it was previously indented

@mjbvz mjbvz changed the title JSX fragment format should indent children Format should indent JSX fragment children Dec 12, 2017
@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter labels Dec 12, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jan 4, 2018
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Jan 4, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants