-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Description
Currently jsx transforms this (with the indentation):
if (this.props.completedCount > 0) {
clearButton = (
<button
id="clear-completed"
onClick={this.props.onClearCompleted}>
Clear completed ({this.props.completedCount})
</button>
);
}into this:
if (this.props.completedCount > 0) {
clearButton = (
React.DOM.button(
{id:"clear-completed",
onClick:this.props.onClearCompleted}, [
" Clear completed (",this.props.completedCount,") " ])
);
}Which fails to pass jshint because of the indentation (the temporary solution is to put {''} before and after the bad line). It gets worse if you prefer the style of putting the > on a new line, it becomes:
if (this.props.completedCount > 0) {
clearButton = (
React.DOM.button(
{id:"clear-completed",
onClick:this.props.onClearCompleted}
, [
" Clear completed (",this.props.completedCount,") " ])
);
}Which fails two additional tests, the comma style (that can be disabled with laxcomma and bad line breaking (not sure if it can be disabled).
Metadata
Metadata
Assignees
Labels
No labels