Skip to content

JSX Formatting issue #46781

@philipwhite

Description

@philipwhite

Issue Type: Bug

This snippet from the meteor tutorial does not get formatted cleanly. Note especially the ending label tag.

render() {
        return (
            <div className="container">
                <header>
                    <h1>Todo List ({this.props.incompleteCount})</h1>
                    <label className="hide-completed">
                        <input
                            type="checkbox"
                            readOnly
                            checked={this.state.hideCompleted}
                            onClick={this.toggleHideCompleted.bind(this)}
                        />
                        Hide Completed Tasks
          </label>
                    <AccountsUIWrapper />

                    <form className="new-task" onSubmit={this.handleSubmit.bind(this)} >
                        <input
                            type="text"
                            ref="textInput"
                            placeholder="Type to add new tasks"
                        />
                    </form>
                </header>

                <ul>
                    {this.renderTasks()}
                </ul>
            </div>
        );
    }

VS Code version: Code 1.21.1 (79b44aa, 2018-03-14T14:39:09.335Z)
OS version: Darwin x64 16.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
Load (avg) 2, 2, 2
Memory (System) 16.00GB (1.40GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron
Screen Reader no
VM 0%
Extensions: none Reproduces without extensions

Metadata

Metadata

Assignees

Labels

formattingSource formatter issuesjavascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions