Skip to content

Format code doesn't do the right thing with TSX/JSX #5925

Closed
@dbaeumer

Description

@dbaeumer

From @prencher on December 3, 2015 20:0

When formatting the following snippet:

ReactDOM.render(
    <Router history={createHistory() }>
        <Route path='/' component={App}>
            <IndexRoute component={SplashView} />
            <Route path='home' component={HomeView} />
            <Route path='chat' component={ChatView} />
            <Route path='/chat/:contact' component={ChatView} />
        </Route>
    </Router>,
    document.getElementById('app')
);

The closing tags are not properly unindented, and outputs the following:

ReactDOM.render(
    <Router history={createHistory() }>
        <Route path='/' component={App}>
            <IndexRoute component={SplashView} />
            <Route path='home' component={HomeView} />
            <Route path='chat' component={ChatView} />
            <Route path='/chat/:contact' component={ChatView} />
            </Route>
        </Router>,
    document.getElementById('app')
);

Copied from original issue: microsoft/vscode#985

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions