Skip to content

Commit

Permalink
style: enable react/jsx-closing-bracket-location
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Jun 6, 2016
1 parent 4af2731 commit 2144349
Show file tree
Hide file tree
Showing 105 changed files with 435 additions and 219 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const eslintrc = {
'arrow-body-style': 0,
'react/sort-comp': 0,
'react/prop-types': 0,
'react/jsx-closing-bracket-location': 0,
'react/jsx-first-prop-new-line': 0,
'import/no-unresolved': 0,
'no-param-reassign': 0,
Expand Down
6 changes: 4 additions & 2 deletions components/alert/demo/closable.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ ReactDOM.render(<div>
<Alert message="警告提示的文案"
type="warning"
closable
onClose={onClose} />
onClose={onClose}
/>
<Alert message="错误提示的文案"
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
type="error"
closable
onClose={onClose} />
onClose={onClose}
/>
</div>, mountNode);
````
12 changes: 8 additions & 4 deletions components/alert/demo/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ import { Alert } from 'antd';
ReactDOM.render(<div>
<Alert message="成功提示的文案"
description="成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍"
type="success" />
type="success"
/>
<Alert message="消息提示的文案"
description="消息提示的辅助性文字介绍消息提示的辅助性文字介绍消息提示的辅助性文字介绍"
type="info" />
type="info"
/>
<Alert
message="警告提示的文案"
description="警告提示的辅助性文字介绍警告提示的辅助性文字介绍"
type="warning" />
type="warning"
/>
<Alert
message="错误提示的文案"
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
type="error" />
type="error"
/>
</div>, mountNode);
````
12 changes: 8 additions & 4 deletions components/alert/demo/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ ReactDOM.render(<div>
<Alert message="成功提示的文案"
description="成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍"
type="success"
showIcon />
showIcon
/>
<Alert message="消息提示的文案"
description="消息提示的辅助性文字介绍消息提示的辅助性文字介绍消息提示的辅助性文字介绍"
type="info"
showIcon />
showIcon
/>
<Alert
message="警告提示的文案"
description="警告提示的辅助性文字介绍警告提示的辅助性文字介绍"
type="warning"
showIcon />
showIcon
/>
<Alert
message="错误提示的文案"
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
type="error"
showIcon />
showIcon
/>
</div>, mountNode);
````
3 changes: 2 additions & 1 deletion components/alert/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export default class Alert extends React.Component {
<Animate component=""
showProp="data-show"
transitionName="slide-up"
onEnd={this.animationEnd}>
onEnd={this.animationEnd}
>
<div data-show={this.state.closing} className={alertCls}>
{showIcon ? <Icon className="ant-alert-icon" type={iconType} /> : null}
<span className={`${prefixCls}-message`}>{message}</span>
Expand Down
6 changes: 4 additions & 2 deletions components/badge/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ export default class Badge extends React.Component {
<Animate component=""
showProp="data-show"
transitionName={`${prefixCls}-zoom`}
transitionAppear>
transitionAppear
>
{
hidden ? null :
<ScrollNumber data-show={!hidden} className={scrollNumberCls}
count={count} style={style} />
count={count} style={style}
/>
}
</Animate>
</span>
Expand Down
3 changes: 2 additions & 1 deletion components/breadcrumb/demo/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ function Home(props) {
marginTop: 15,
paddingBottom: 15,
borderBottom: '1px dashed #ccc',
}}>
}}
>
点击上面的导航切换页面,面包屑在下面:
</div>
<Breadcrumb {...props} />
Expand Down
3 changes: 2 additions & 1 deletion components/button/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export default class Button extends React.Component {
type={htmlType || 'button'}
className={classes}
onMouseUp={this.handleMouseUp}
onClick={this.handleClick}>
onClick={this.handleClick}
>
{iconType ? <Icon type={iconType} /> : null}{kids}
</button>
);
Expand Down
6 changes: 4 additions & 2 deletions components/calendar/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default class Header extends React.Component {
dropdownMenuStyle={{ minWidth: 103 }}
className={`${prefixCls}-year-select`}
onChange={this.onYearChange}
value={String(year)}>
value={String(year)}
>
{options}
</Select>
);
Expand All @@ -69,7 +70,8 @@ export default class Header extends React.Component {
dropdownMatchSelectWidth={false}
className={`${prefixCls}-month-select`}
value={String(month)}
onChange={this.onMonthChange}>
onChange={this.onMonthChange}
>
{options}
</Select>
);
Expand Down
3 changes: 2 additions & 1 deletion components/calendar/demo/custom-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function monthCellRender(value) {

ReactDOM.render(
<Calendar defaultValue={new Date('2010-10-10')}
dateCellRender={dateCellRender} monthCellRender={monthCellRender} />
dateCellRender={dateCellRender} monthCellRender={monthCellRender}
/>
, mountNode);
````
6 changes: 4 additions & 2 deletions components/calendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export default class Calendar extends React.Component {
locale={locale.lang}
prefixCls={prefixCls}
onTypeChange={this.setType}
onValueChange={this.setValue} />
onValueChange={this.setValue}
/>
<FullCalendar
{...props}
Select={noop}
Expand All @@ -149,7 +150,8 @@ export default class Calendar extends React.Component {
showHeader={false}
value={value}
monthCellRender={this.monthCellRender}
dateCellRender={this.dateCellRender} />
dateCellRender={this.dateCellRender}
/>
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion components/cascader/demo/custom-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ReactDOM.render(
options={options}
defaultValue={['zhejiang', 'hangzhou', 'xihu']}
displayRender={displayRender}
style={{ width: 200 }} />
style={{ width: 200 }}
/>
, mountNode);
````
3 changes: 2 additions & 1 deletion components/cascader/demo/hover.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function displayRender(label) {

ReactDOM.render(
<Cascader options={options} expandTrigger="hover"
displayRender={displayRender} onChange={onChange} />
displayRender={displayRender} onChange={onChange}
/>
, mountNode);
````
12 changes: 8 additions & 4 deletions components/cascader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export default class Cascader extends React.Component {
const clearIcon = (allowClear && !disabled && this.state.value.length > 0) ?
<Icon type="cross-circle"
className={`${prefixCls}-picker-clear`}
onClick={this.clearSelection} /> : null;
onClick={this.clearSelection}
/> : null;
const arrowCls = classNames({
[`${prefixCls}-picker-arrow`]: true,
[`${prefixCls}-picker-arrow-expand`]: this.state.popupVisible,
Expand All @@ -99,17 +100,20 @@ export default class Cascader extends React.Component {
value={this.state.value}
popupVisible={this.state.popupVisible}
onPopupVisibleChange={this.handlePopupVisibleChange}
onChange={this.handleChange}>
onChange={this.handleChange}
>
{children ||
<span
style={style}
className={pickerCls}>
className={pickerCls}
>
<Input {...otherProps}
placeholder={this.state.value && this.state.value.length > 0 ? null : placeholder}
className={`${prefixCls}-input ant-input ${sizeCls}`}
value={null}
disabled={disabled}
readOnly />
readOnly
/>
<span className={`${prefixCls}-picker-label`}>{this.getLabel()}</span>
{clearIcon}
<Icon type="down" className={arrowCls} />
Expand Down
3 changes: 2 additions & 1 deletion components/checkbox/Group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default class CheckboxGroup extends React.Component {
<Checkbox disabled={'disabled' in option ? option.disabled : this.props.disabled}
checked={this.state.value.indexOf(option.value) !== -1}
onChange={() => this.toggleOption(option)}
className="ant-checkbox-group-item" key={option.value}>
className="ant-checkbox-group-item" key={option.value}
>
{option.label}
</Checkbox>
)
Expand Down
9 changes: 6 additions & 3 deletions components/checkbox/demo/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@ const App = React.createClass({
<p style={{ marginBottom: '20px' }}>
<Checkbox checked={this.state.checked}
disabled={this.state.disabled}
onChange={this.onChange}>
onChange={this.onChange}
>
{label}
</Checkbox>
</p>
<p>
<Button type="primary" size="small"
onClick={this.toggleChecked}>
onClick={this.toggleChecked}
>
{!this.state.checked ? '选中' : '取消'}
</Button>
<Button style={{ marginLeft: '10px' }}
type="primary" size="small"
onClick={this.toggleDisable}>
onClick={this.toggleDisable}
>
{!this.state.disabled ? '不可用' : '可用'}
</Button>
</p>
Expand Down
6 changes: 4 additions & 2 deletions components/date-picker/RangePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ export default class RangePicker extends React.Component {
onChange={props.handleInputChange}
value={start ? props.getFormatter().format(start) : ''}
placeholder={startPlaceholder}
className="ant-calendar-range-picker-input" />
className="ant-calendar-range-picker-input"
/>
<span className="ant-calendar-range-picker-separator"> ~ </span>
<input
disabled={disabled}
onChange={props.handleInputChange}
value={end ? props.getFormatter().format(end) : ''}
placeholder={endPlaceholder}
className="ant-calendar-range-picker-input" />
className="ant-calendar-range-picker-input"
/>
<span className="ant-calendar-picker-icon" />
</span>
);
Expand Down
3 changes: 2 additions & 1 deletion components/date-picker/createPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export default function createPicker(TheCalendar) {
onChange={props.handleInputChange}
value={value ? props.getFormatter().format(value) : ''}
placeholder={placeholder}
className={props.pickerInputClass} />
className={props.pickerInputClass}
/>
<span className="ant-calendar-picker-icon" />
</span>
);
Expand Down
6 changes: 4 additions & 2 deletions components/date-picker/demo/start-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ const DateRange = React.createClass({
<DatePicker disabledDate={this.disabledStartDate}
value={this.state.startValue}
placeholder="开始日期"
onChange={this.onStartChange} />
onChange={this.onStartChange}
/>
<DatePicker disabledDate={this.disabledEndDate}
value={this.state.endValue}
placeholder="结束日期"
onChange={this.onEndChange} />
onChange={this.onEndChange}
/>
</div>
);
},
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/wrapPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function wrapPicker(Picker, defaultFormat) {
placeholder={locale.timePickerLocale.placeholder}
locale={locale.timePickerLocale}
transitionName="slide-up"
/>
/>
) : null;

return (
Expand Down
3 changes: 2 additions & 1 deletion components/dropdown/demo/overlay-visible.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const OverlayVisible = React.createClass({
return (
<Dropdown overlay={menu}
onVisibleChange={this.handleVisibleChange}
visible={this.state.visible}>
visible={this.state.visible}
>
<a className="ant-dropdown-link" href="#">
鼠标移入 <Icon type="down" />
</a>
Expand Down
Loading

0 comments on commit 2144349

Please sign in to comment.