Skip to content

Commit

Permalink
temp(*): eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinli.lyy committed Jan 25, 2019
1 parent 9366137 commit a5afaf5
Show file tree
Hide file tree
Showing 119 changed files with 244 additions and 224 deletions.
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"es6": true,
"node": true
},
"extends": "@alifd/eslint-config-next"
"extends": "@alifd/eslint-config-next",
"rules": {
"valid-jsdoc": "off",
"max-statements": "off",
"max-len": "off"
}
}
4 changes: 2 additions & 2 deletions docs/affix/demo/on-affix.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class Demo extends React.Component {
constructor(props) {
super(props);
this.state = {
affixed: false,
affixed: false
};
}

onAffix = (affixed) => {
this.setState({
affixed,
affixed
});
}

Expand Down
4 changes: 2 additions & 2 deletions docs/balloon/demo/alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { Button, Balloon } from '@alifd/next';



const top = <Button id="top" style={{margin: '5px'}} className="btrigger">top</Button>;
const right = <Button id="right" style={{margin: '5px'}} className="btrigger">right</Button>;
const top = <Button id="top" style={{margin: '5px'}} className="btrigger">top</Button>;
const right = <Button id="right" style={{margin: '5px'}} className="btrigger">right</Button>;
const bottom = <Button id="bottom" style={{margin: '5px'}} className="btrigger">bottom</Button>;
const left = <Button id="left" style={{margin: '5px'}} className="btrigger">left</Button>;
const topLeft = <Button id="topLeft" style={{margin: '5px'}} className="btrigger">top left</Button>;
Expand Down
4 changes: 2 additions & 2 deletions docs/balloon/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const primary = <Button className="btrigger" style={{margin: '5px'}}>primary sty

const Demo = () => (
<div className="container">
<Balloon trigger={defaultTrigger} closable={false}>
<Balloon trigger={defaultTrigger} closable={false}>
default
</Balloon>
<Balloon type="primary" trigger={primary} triggerType="click">
<Balloon type="primary" trigger={primary} triggerType="click">
primary
</Balloon>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/balloon/demo/nested.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const App = () => (
} />
</Balloon>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<Balloon type="primary" trigger={innerButton} closable={false} triggerType="click">
<Balloon type="primary" trigger={innerButton} closable={false} triggerType="click">
<Balloon trigger={<Button type="primary">please click</Button>} popupContainer={(trigger) => trigger.parentNode} triggerType="click">
nesting balloon content
</Balloon>
Expand Down
2 changes: 1 addition & 1 deletion docs/balloon/demo/tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Button, Balloon } from '@alifd/next';

const Tooltip = Balloon.Tooltip;

const top = <Button style={{margin: '5px'}} id="top" className="btrigger">top</Button>;
const top = <Button style={{margin: '5px'}} id="top" className="btrigger">top</Button>;
const right = <Button style={{margin: '5px'}}id="right" className="btrigger">right</Button>;
const bottom = <Button style={{margin: '5px'}} id="bottom" className="btrigger">bottom</Button>;
const left = <Button style={{margin: '5px'}} id="left" className="btrigger">left</Button>;
Expand Down
2 changes: 1 addition & 1 deletion docs/button/demo/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Button } from '@alifd/next';
const props = {
component: 'a',
href: 'http://www.alibaba.com',
target: '_blank',
target: '_blank'
};

ReactDOM.render(<div>
Expand Down
2 changes: 1 addition & 1 deletion docs/button/demo/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Demo extends React.Component {
super(props, context);

this.state = {
loading: false,
loading: false
};
}

Expand Down
6 changes: 3 additions & 3 deletions docs/calendar/demo/custom-cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ function dateCellRender(date) {
case 1:
eventList = [
{ type: 'primary', content: 'Event 1' },
{ type: 'normal', content: 'Event 2' },
{ type: 'normal', content: 'Event 2' }
];
break;
case 10:
eventList = [
{ type: 'normal', content: 'Event 3' },
{ type: 'normal', content: 'Event 4' },
{ type: 'normal', content: 'Event 4' }
];
break;
case 11:
eventList = [
{ type: 'primary', content: 'Event 5' },
{ type: 'primary', content: 'Event 6' },
{ type: 'primary', content: 'Event 6' }
];
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion docs/card/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Card } from '@alifd/next';
const commonProps = {
style: { width: 300 },
subTitle: 'SubTitle',
extra: 'Link',
extra: 'Link'
};

ReactDOM.render(<div>
Expand Down
2 changes: 1 addition & 1 deletion docs/card/demo/custom-height.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Card } from '@alifd/next';
const commonProps = {
style: { width: 300 },
title: 'Title',
subTitle: 'Sub-title',
subTitle: 'Sub-title'
};

ReactDOM.render(<div>
Expand Down
2 changes: 1 addition & 1 deletion docs/card/demo/head-underline.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const commonProps = {
title: 'Title',
style: { width: 300 },
subTitle: 'Sub-title',
extra: 'Link',
extra: 'Link'
};

ReactDOM.render(<div>
Expand Down
4 changes: 2 additions & 2 deletions docs/collapse/demo/datasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const list = [
{
title: 'Well, hello there',
content: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
disabled: true,
disabled: true
},
{
title: 'Gigantomaniac Monster Text, very long, much width, wow',
content: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
content: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.'
},
{
title: 'Generic Title',
Expand Down
6 changes: 3 additions & 3 deletions docs/config-provider/demo/consumer.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import PropTypes from 'prop-types';
const localeSettings = {
momentLocale: 'fr-FR',
CustomizedComponent: {
helloWorld: 'hello, world',
},
helloWorld: 'hello, world'
}
};

const App = ({ children }) => (
Expand All @@ -37,7 +37,7 @@ const App = ({ children }) => (
);

App.propTypes = {
children: PropTypes.node,
children: PropTypes.node
};

const Child = () => (
Expand Down
4 changes: 2 additions & 2 deletions docs/date-picker/demo/custom-range-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CustomRangePicker extends React.Component {
this.state = {
startValue: null,
endValue: null,
endOpen: false,
endOpen: false
};
}

Expand All @@ -47,7 +47,7 @@ class CustomRangePicker extends React.Component {

onChange = (stateName, value) => {
this.setState({
[stateName]: value,
[stateName]: value
});
}

Expand Down
24 changes: 12 additions & 12 deletions docs/date-picker/demo/field.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ class App extends React.Component {

return (
<div>
<DatePicker {...init('date', { rules: [ {
<DatePicker {...init('date', { rules: [{
required: true,
message: '请选择日期',
} ] })} />{this.printError('date')}<br /><br />
<MonthPicker {...init('month', { rules: [ {
message: '请选择日期'
}] })} />{this.printError('date')}<br /><br />
<MonthPicker {...init('month', { rules: [{
required: true,
message: '请选择月份',
} ] })} />{this.printError('month')}<br /><br />
<YearPicker {...init('year', { rules: [ {
message: '请选择月份'
}] })} />{this.printError('month')}<br /><br />
<YearPicker {...init('year', { rules: [{
required: true,
message: '请选择年份',
} ] })} />{this.printError('year')}<br /><br />
<RangePicker {...init('range', { rules: [ {
message: '请选择年份'
}] })} />{this.printError('year')}<br /><br />
<RangePicker {...init('range', { rules: [{
required: true,
message: '请选择日期范围',
} ] })} />{this.printError('range')}<br /><br />
message: '请选择日期范围'
}] })} />{this.printError('range')}<br /><br />
<Button onClick={this.printData}>Print to Console</Button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/date-picker/demo/footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function footerRender() {
}

ReactDOM.render(<div>
<DatePicker footerRender={footerRender} />&nbsp;&nbsp;
<DatePicker footerRender={footerRender} />&nbsp;&nbsp;
<RangePicker footerRender={footerRender} />
</div>, mountNode);
````
Expand Down
2 changes: 1 addition & 1 deletion docs/date-picker/demo/popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { RangePicker } = DatePicker;

ReactDOM.render(<div>
<p>Change popup align</p>
<DatePicker popupAlign="bl tl" />
<DatePicker popupAlign="bl tl" />
<p>Change popup container</p>
<RangePicker popupContainer={target => target.parentNode} />
</div>, mountNode);
Expand Down
2 changes: 1 addition & 1 deletion docs/field/demo/autounmout.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Input, Button, Field } from '@alifd/next';
class Demo extends React.Component {
state = {
show: true,
show2: true,
show2: true
}
field = new Field(this);
field2 = new Field(this, { autoUnmount: false });
Expand Down
2 changes: 1 addition & 1 deletion docs/field/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class App extends React.PureComponent {
const { init, setValue, reset } = this.field;

return (<div className="demo">
<Input {...init('input', {initValue: 'test'})} />
<Input {...init('input', {initValue: 'test'})} />
<br/><br/>
<Button type="primary" onClick={this.onGetValue.bind(this)}>getValue</Button>
<Button type="primary" onClick={() => setValue('input', 'set me by click')}>setValue</Button>
Expand Down
2 changes: 1 addition & 1 deletion docs/field/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class App extends React.Component {
const { init, setValue, reset } = this.field;

return (<div className="demo">
<Custom {...init('custom', {initValue: ['test']})} />
<Custom {...init('custom', {initValue: ['test']})} />

<br/><br/>

Expand Down
4 changes: 2 additions & 2 deletions docs/field/demo/dynamic.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Demo extends React.Component {

this.field = new Field(this, {
parseName: true,
autoUnmount: true,
autoUnmount: true
});
}

Expand All @@ -43,7 +43,7 @@ class Demo extends React.Component {
add = () => {
const { tableSource } = this.state;
tableSource.push({
id: ++this.idx,
id: ++this.idx
});

this.setState({ tableSource });
Expand Down
4 changes: 2 additions & 2 deletions docs/field/demo/mix.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ class App extends React.Component {
<br/>

<Range style={{...layout, marginTop: 30}} slider={'double'} scales={10}
marks={10} {...init('range', {initValue: [20, 40]})}/>
marks={10} {...init('range', {initValue: [20, 40]})}/>

<div style={{marginBottom: 10}}>
<CheckboxGroup dataSource={list} {...init('checkboxgroup', {initValue: ['apple']})} />
<CheckboxGroup dataSource={list} {...init('checkboxgroup', {initValue: ['apple']})} />
</div>
<div style={{marginBottom: 10}}>
<DatePicker {...init('datepicker')}/>
Expand Down
8 changes: 4 additions & 4 deletions docs/field/demo/redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Demo extends React.Component {
type: 'save_fields',
payload: {
email: '[email protected]'
},
}
});
}

Expand All @@ -71,7 +71,7 @@ class Demo extends React.Component {
return (<div>
<Input {...init('email', { initValue: this.props.email }, {
rules: [
{required: true, type: 'email', message: 'at least 5 chars'},
{required: true, type: 'email', message: 'at least 5 chars'}
]
})} />
now length is:{newLen.value}
Expand All @@ -84,13 +84,13 @@ class Demo extends React.Component {

const ReduxDemo = connect((state) => {
return {
email: state.formReducer.email,
email: state.formReducer.email
};
})(Demo);


const store = createStore(combineReducers({
formReducer,
formReducer
}));

ReactDOM.render((<Provider store={store}>
Expand Down
6 changes: 3 additions & 3 deletions docs/field/demo/seterror.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class App extends React.Component {
render() {
const { init, getError, setError, setErrors } = this.field;
return (<div className="demo">
<Input {...init('input', {
<Input {...init('input', {
rules: [{
required: true,
pattern: /hello/,
message: 'must be hello'
}]
})} /><br/>
})} /><br/>
<span style={{color: 'red'}}>{getError('input')}</span>

<br/>
Expand All @@ -48,7 +48,7 @@ class App extends React.Component {
}}>clear</Button>

<br/><br/>
<Input {...init('input2')} /><br/>
<Input {...init('input2')} /><br/>
<span style={{color: 'red'}}>{getError('input2')}</span><br/>

<Button onClick={() => {
Expand Down
8 changes: 4 additions & 4 deletions docs/field/demo/topath.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ class App extends React.Component {

return (<div className="demo">
<h3>Object transfer</h3>
obj.b: <Input {...init('obj.b', {initValue: 'test1'})} /> &nbsp;
obj.c: <Input {...init('obj.c', {initValue: 'test2'})} />
obj.b: <Input {...init('obj.b', {initValue: 'test1'})} /> &nbsp;
obj.c: <Input {...init('obj.c', {initValue: 'test2'})} />

<br/>

<h3>Array transfer</h3>
arr.0: <Input {...init('arr.0', {initValue: '0'})} /> &nbsp;
arr.1: <Input {...init('arr.1', {initValue: '1'})} />
arr.0: <Input {...init('arr.0', {initValue: '0'})} /> &nbsp;
arr.1: <Input {...init('arr.1', {initValue: '1'})} />
<br/><br/>

result:
Expand Down
Loading

0 comments on commit a5afaf5

Please sign in to comment.