Skip to content

Commit

Permalink
Merge pull request #3397 from oliviertassinari/eslint-enforce-jsx-spa…
Browse files Browse the repository at this point in the history
…ce-before-closing

[eslint] Enforce jsx-space-before-closing
  • Loading branch information
oliviertassinari committed Feb 21, 2016
2 parents 04d13b5 + 26a8c36 commit c75f3f2
Show file tree
Hide file tree
Showing 69 changed files with 160 additions and 159 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ rules:
react/jsx-no-duplicate-props: 2
react/jsx-no-undef: 2
react/jsx-pascal-case: 2
react/jsx-space-before-closing: 2
react/jsx-uses-react: 2
react/jsx-uses-vars: 2
react/no-danger: 2
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/CodeExample/CodeBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ${this.props.children}
return (
<div style={styles.root}>
<div onTouchTap={this.handleTouchTap} style={styles.codeBlockTitle}>
<CodeBlockTitle title={this.props.title} tooltip={tooltip}/>
<CodeBlockTitle title={this.props.title} tooltip={tooltip} />
</div>
<MarkdownElement style={codeStyle} text={text} />
<MarkdownElement style={descriptionStyle} text={this.props.description} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const AutoCompleteExampleNoFilter = () => (
hintText="text-value data"
filter={AutoComplete.noFilter}
dataSource={dataSource1}
/><br/>
/><br />
<AutoComplete
floatingLabelText="showAllItems"
filter={AutoComplete.noFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const AutoCompleteExampleFilters = () => (
filter={AutoComplete.caseInsensitiveFilter}
dataSource={colors}
/>
<br/>
<br />
<AutoComplete
floatingLabelText="Type 'peah', fuzzy search"
filter={AutoComplete.fuzzyFilter}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/pages/components/Avatar/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const AvatarsPage = () => (
>
<AvatarExampleSimple />
</CodeExample>
<PropTypeDescription code={avatarCode}/>
<PropTypeDescription code={avatarCode} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import FolderIcon from 'material-ui/lib/svg-icons/file/folder-open';
const BadgeExampleContent = () => (
<div>
<Badge
badgeContent={<IconButton tooltip="Backup"><UploadIcon/></IconButton>}
badgeContent={<IconButton tooltip="Backup"><UploadIcon /></IconButton>}
>
<FolderIcon />
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const BadgeExampleSimple = () => (
badgeStyle={{top: 12, right: 12}}
>
<IconButton tooltip="Notifications">
<NotificationsIcon/>
<NotificationsIcon />
</IconButton>
</Badge>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/pages/components/Badge/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const BadgePage = () => (
>
<BadgeExampleContent />
</CodeExample>
<PropTypeDescription code={badgeCode}/>
<PropTypeDescription code={badgeCode} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class CardExampleControlled extends React.Component {
>
<img src="http://lorempixel.com/600/337/nature/" />
</CardMedia>
<CardTitle title="Card title" subtitle="Card subtitle" expandable={true}/>
<CardTitle title="Card title" subtitle="Card subtitle" expandable={true} />
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const CardExampleWithoutAvatar = () => (
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</CardText>
<CardActions expandable={true}>
<FlatButton label="Action1"/>
<FlatButton label="Action2"/>
<FlatButton label="Action1" />
<FlatButton label="Action2" />
</CardActions>
</Card>
);
Expand Down
10 changes: 5 additions & 5 deletions docs/src/app/components/pages/components/Card/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const CardPage = () => (
<CardExampleControlled />
</CodeExample>
<PropTypeDescription code={cardCode} header="### Card properties" />
<PropTypeDescription code={cardActionsCode} header="### CardActions properties"/>
<PropTypeDescription code={cardHeaderCode} header="### CardHeader properties"/>
<PropTypeDescription code={cardMediaCode} header="### CardMedia properties"/>
<PropTypeDescription code={cardTextCode} header="### CardText properties"/>
<PropTypeDescription code={cardTitleCode} header="### CardTitle properties"/>
<PropTypeDescription code={cardActionsCode} header="### CardActions properties" />
<PropTypeDescription code={cardHeaderCode} header="### CardHeader properties" />
<PropTypeDescription code={cardMediaCode} header="### CardMedia properties" />
<PropTypeDescription code={cardTextCode} header="### CardText properties" />
<PropTypeDescription code={cardTitleCode} header="### CardTitle properties" />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export default class CircularProgressExampleDeterminate extends React.Component
render() {
return (
<div>
<CircularProgress mode="determinate" value={this.state.completed}/>
<CircularProgress mode="determinate" value={this.state.completed} size={1.5}/>
<CircularProgress mode="determinate" value={this.state.completed} size={2}/>
<CircularProgress mode="determinate" value={this.state.completed} />
<CircularProgress mode="determinate" value={this.state.completed} size={1.5} />
<CircularProgress mode="determinate" value={this.state.completed} size={2} />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const CircleProgressPage = () => (
>
<CircleProgressExampleDeterminate />
</CodeExample>
<PropTypeDescription code={circleProgressCode}/>
<PropTypeDescription code={circleProgressCode} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function disableRandomDates() {

const DatePickerExampleDisableDates = () => (
<div>
<DatePicker hintText="Weekends Disabled" shouldDisableDate={disableWeekends}/>
<DatePicker hintText="Random Dates Disabled" shouldDisableDate={disableRandomDates}/>
<DatePicker hintText="Weekends Disabled" shouldDisableDate={disableWeekends} />
<DatePicker hintText="Random Dates Disabled" shouldDisableDate={disableRandomDates} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const DividerExampleList = () => (
<ListItem insetChildren={true} primaryText="Janet Perkins Bennet" />
<ListItem insetChildren={true} primaryText="Peter Carlsson" />
</List>
<Divider inset={true}/>
<Divider inset={true} />
<List>
<ListItem insetChildren={true} primaryText="Aaron Bennet" />
<ListItem insetChildren={true} primaryText="Abbey Christensen" />
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/pages/components/Divider/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const DividerPage = () => {
>
<DividerExampleMenu />
</CodeExample>
<PropTypeDescription code={dividerCode}/>
<PropTypeDescription code={dividerCode} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import MenuItem from 'material-ui/lib/menus/menu-item';

const items = [];
for (let i = 0; i < 100; i++ ) {
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`}/>);
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`} />);
}

export default class DropDownMenuLongMenuExample extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export default class DropDownMenuOpenImmediateExample extends React.Component {
render() {
return (
<DropDownMenu value={this.state.value} onChange={this.handleChange} openImmediately={true}>
<MenuItem value={1} primaryText="Never"/>
<MenuItem value={2} primaryText="Every Night"/>
<MenuItem value={3} primaryText="Weeknights"/>
<MenuItem value={4} primaryText="Weekends"/>
<MenuItem value={5} primaryText="Weekly"/>
<MenuItem value={1} primaryText="Never" />
<MenuItem value={2} primaryText="Every Night" />
<MenuItem value={3} primaryText="Weeknights" />
<MenuItem value={4} primaryText="Weekends" />
<MenuItem value={5} primaryText="Weekly" />
</DropDownMenu>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export default class DropDownMenuSimpleExample extends React.Component {
render() {
return (
<DropDownMenu value={this.state.value} onChange={this.handleChange}>
<MenuItem value={1} primaryText="Never"/>
<MenuItem value={2} primaryText="Every Night"/>
<MenuItem value={3} primaryText="Weeknights"/>
<MenuItem value={4} primaryText="Weekends"/>
<MenuItem value={5} primaryText="Weekly"/>
<MenuItem value={1} primaryText="Never" />
<MenuItem value={2} primaryText="Every Night" />
<MenuItem value={3} primaryText="Weeknights" />
<MenuItem value={4} primaryText="Weekends" />
<MenuItem value={5} primaryText="Weekly" />
</DropDownMenu>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const GridListExampleComplex = () => (
<GridTile
key={tile.img}
title={tile.title}
actionIcon={<IconButton><StarBorder color="white"/></IconButton>}
actionIcon={<IconButton><StarBorder color="white" /></IconButton>}
actionPosition="left"
titlePosition="top"
titleBackground="linear-gradient(to bottom, rgba(0,0,0,0.7) 0%,rgba(0,0,0,0.3) 70%,rgba(0,0,0,0) 100%)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const GridListExampleSimple = () => (
key={tile.img}
title={tile.title}
subtitle={<span>by <b>{tile.author}</b></span>}
actionIcon={<IconButton><StarBorder color="white"/></IconButton>}
actionIcon={<IconButton><StarBorder color="white" /></IconButton>}
>
<img src={tile.img} />
</GridTile>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/components/pages/components/GridList/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const GridListPage = () => (
>
<GridListExampleComplex />
</CodeExample>
<PropTypeDescription header="### GridList Properties" code={gridListCode}/>
<PropTypeDescription header="### GridTile Properties" code={gridTileCode}/>
<PropTypeDescription header="### GridList Properties" code={gridListCode} />
<PropTypeDescription header="### GridTile Properties" code={gridTileCode} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import ActionGrade from 'material-ui/lib/svg-icons/action/grade';
const IconButtonExampleTouch = () => (
<div>
<IconButton tooltip="bottom-right" touch={true} tooltipPosition="bottom-right">
<ActionGrade/>
<ActionGrade />
</IconButton>
<IconButton tooltip="bottom-center" touch={true} tooltipPosition="bottom-center">
<ActionGrade/>
<ActionGrade />
</IconButton>
<IconButton tooltip="bottom-left" touch={true} tooltipPosition="bottom-left">
<ActionGrade/>
<ActionGrade />
</IconButton>
<IconButton tooltip="top-right" touch={true} tooltipPosition="top-right">
<ActionGrade/>
<ActionGrade />
</IconButton>
<IconButton tooltip="top-center" touch={true} tooltipPosition="top-center">
<ActionGrade/>
<ActionGrade />
</IconButton>
<IconButton tooltip="top-left" touch={true} tooltipPosition="top-left">
<ActionGrade/>
<ActionGrade />
</IconButton>
</div>
);
Expand Down
8 changes: 4 additions & 4 deletions docs/src/app/components/pages/components/IconButton/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ const IconButtonPage = () => (
description={descriptions.simple}
code={iconButtonExampleSimpleCode}
>
<IconButtonExampleSimple/>
<IconButtonExampleSimple />
</CodeExample>
<CodeExample
title="Further examples"
description={descriptions.other}
code={iconButtonExampleComplexCode}
>
<IconButtonExampleComplex/>
<IconButtonExampleComplex />
</CodeExample>
<CodeExample
title="Tooltip examples"
description={descriptions.tooltip}
code={iconButtonExampleTooltipCode}
>
<IconButtonExampleTooltip/>
<IconButtonExampleTooltip />
</CodeExample>
<CodeExample
title="Touch example"
description={descriptions.touch}
code={iconButtonExampleTouchCode}
>
<IconButtonExampleTouch/>
<IconButtonExampleTouch />
</CodeExample>
<PropTypeDescription code={iconButtonCode} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MoreVertIcon from 'material-ui/lib/svg-icons/navigation/more-vert';
const IconMenuExampleNested = () => (
<div>
<IconMenu
iconButtonElement={<IconButton><MoreVertIcon/></IconButton>}
iconButtonElement={<IconButton><MoreVertIcon /></IconButton>}
anchorOrigin={{horizontal: 'left', vertical: 'top'}}
targetOrigin={{horizontal: 'left', vertical: 'top'}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class LeftNavOpenRightExample extends React.Component {
onTouchTap={this.handleToggle}
/>
<LeftNav width={200} openRight={true} open={this.state.open} >
<AppBar title="AppBar"/>
<AppBar title="AppBar" />
</LeftNav>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import LinearProgress from 'material-ui/lib/linear-progress';

const LinearProgressExampleSimple = () => (
<LinearProgress mode="indeterminate"/>
<LinearProgress mode="indeterminate" />
);

export default LinearProgressExampleSimple;
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const LinearProgressPage = () => (
>
<LinearProgressExampleDeterminate />
</CodeExample>
<PropTypeDescription code={linearProgressCode}/>
<PropTypeDescription code={linearProgressCode} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const ListExampleMessages = () => (
primaryText="Brendan Lim"
secondaryText={
<p>
<span style={{color: darkBlack}}>Brunch this weekend?</span><br/>
<span style={{color: darkBlack}}>Brunch this weekend?</span><br />
I&apos;ll be in your neighborhood doing errands this weekend. Do you want to grab brunch?
</p>
}
Expand All @@ -119,7 +119,7 @@ const ListExampleMessages = () => (
primaryText="me, Scott, Jennifer"
secondaryText={
<p>
<span style={{color: darkBlack}}>Summer BBQ</span><br/>
<span style={{color: darkBlack}}>Summer BBQ</span><br />
Wish I could come, but I&apos;m out of town this weekend.
</p>
}
Expand All @@ -132,7 +132,7 @@ const ListExampleMessages = () => (
primaryText="Grace Ng"
secondaryText={
<p>
<span style={{color: darkBlack}}>Oui oui</span><br/>
<span style={{color: darkBlack}}>Oui oui</span><br />
Do you have any Paris recs? Have you ever been?
</p>
}
Expand All @@ -145,7 +145,7 @@ const ListExampleMessages = () => (
primaryText="Kerem Suer"
secondaryText={
<p>
<span style={{color: darkBlack}}>Birthday gift</span><br/>
<span style={{color: darkBlack}}>Birthday gift</span><br />
Do you have any ideas what we can get Heidi for her birthday? How about a pony?
</p>
}
Expand All @@ -158,7 +158,7 @@ const ListExampleMessages = () => (
primaryText="Raquel Parrado"
secondaryText={
<p>
<span style={{color: darkBlack}}>Recipe to try</span><br/>
<span style={{color: darkBlack}}>Recipe to try</span><br />
We should eat this: grated squash. Corn and tomatillo tacos.
</p>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const MenuExampleIcons = () => (
<Menu style={style.menu} desktop={false}>
<MenuItem primaryText="Clear Config" />
<MenuItem primaryText="New Config" rightIcon={<PersonAdd />} />
<MenuItem primaryText="Project" rightIcon={<FontIcon className="material-icons">settings</FontIcon>}/>
<MenuItem primaryText="Project" rightIcon={<FontIcon className="material-icons">settings</FontIcon>} />
<MenuItem
primaryText="Workspace"
rightIcon={
Expand Down
10 changes: 5 additions & 5 deletions docs/src/app/components/pages/components/Paper/ExampleCircle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const style = {

const PaperExampleCircle = () => (
<div>
<Paper style={style} zDepth={1} circle={true}/>
<Paper style={style} zDepth={2} circle={true}/>
<Paper style={style} zDepth={3} circle={true}/>
<Paper style={style} zDepth={4} circle={true}/>
<Paper style={style} zDepth={5} circle={true}/>
<Paper style={style} zDepth={1} circle={true} />
<Paper style={style} zDepth={2} circle={true} />
<Paper style={style} zDepth={3} circle={true} />
<Paper style={style} zDepth={4} circle={true} />
<Paper style={style} zDepth={5} circle={true} />
</div>
);

Expand Down
Loading

0 comments on commit c75f3f2

Please sign in to comment.