Skip to content

Commit 91f1a17

Browse files
committed
remove semi
1 parent 2451eb2 commit 91f1a17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+3207
-3253
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
127127
"padded-blocks": [2, "never"],
128128
"quotes": [2, "single", "avoid-escape"],
129-
"semi": [2, "always"],
129+
"semi": [2, "never"],
130130
"semi-spacing": [2, { "before": false, "after": true }],
131131
"space-before-blocks": [2, "always"],
132132
"space-before-function-paren": [2, "always"],

docs/src/js/Code.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
'use strict';
1+
'use strict'
22

3-
import { Component, PropTypes } from 'react';
4-
import { findDOMNode } from 'react-dom';
3+
import { Component, PropTypes } from 'react'
4+
import { findDOMNode } from 'react-dom'
55

66
class Code extends Component {
77
componentDidMount () {
8-
window.prettyPrint(null, findDOMNode(this.code));
8+
window.prettyPrint(null, findDOMNode(this.code))
99
}
1010

1111
render () {
@@ -15,12 +15,12 @@ class Code extends Component {
1515
{this.props.children}
1616
</pre>
1717
</div>
18-
);
18+
)
1919
}
2020
};
2121

2222
Code.propTypes = {
2323
children: PropTypes.any
24-
};
24+
}
2525

26-
export default Code;
26+
export default Code

docs/src/js/CommDocs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
'use strict';
1+
'use strict'
22

3-
import Code from './Code';
3+
import Code from './Code'
44

55
module.exports = {
66
TplDataDesc () {
@@ -22,6 +22,6 @@ module.exports = {
2222
<div>可以使用一维数组,这种情况下,显示文字与值相同</div>
2323
<Code>{'["北京","上海","广州"]'}</Code>
2424
</div>
25-
);
25+
)
2626
}
27-
};
27+
}

docs/src/js/Example.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
'use strict';
1+
'use strict'
22

3-
import { PropTypes } from 'react';
4-
import classnames from 'classnames';
3+
import { PropTypes } from 'react'
4+
import classnames from 'classnames'
55

66
const Example = (props) => {
77
return (
88
<div className={classnames('docs-example', props.className)}>
99
{props.children}
1010
</div>
11-
);
12-
};
11+
)
12+
}
1313

1414
Example.propTypes = {
1515
children: PropTypes.any,
1616
className: PropTypes.string
17-
};
17+
}
1818

19-
module.exports = Example;
19+
module.exports = Example

docs/src/js/Language.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
'use strict';
1+
'use strict'
22

3-
import { create, getLanguage } from 'react-language';
3+
import { create, getLanguage } from 'react-language'
44

5-
export const En = create(true);
6-
export const Cn = create('zh-CN');
5+
export const En = create(true)
6+
export const Cn = create('zh-CN')
77

8-
import EN from '../../../src/lang/en';
9-
import CN from '../../../src/lang/zh-cn';
10-
import { setLang } from '../../../src/lang';
8+
import EN from '../../../src/lang/en'
9+
import CN from '../../../src/lang/zh-cn'
10+
import { setLang } from '../../../src/lang'
1111

12-
setLang(getLanguage().toLowerCase() === 'zh-cn' ? CN : EN);
12+
setLang(getLanguage().toLowerCase() === 'zh-cn' ? CN : EN)

docs/src/js/app.jsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
'use strict';
1+
'use strict'
22

33
global.uiRequire = function (src) {
44
if (src) {
5-
return require('../../../src/' + src);
5+
return require('../../../src/' + src)
66
} else {
7-
return require('../../../src/');
7+
return require('../../../src/')
88
}
9-
};
9+
}
1010

11-
import ReactDOM from 'react-dom';
12-
const AppRoutes = require('./appRoutes.jsx');
11+
import ReactDOM from 'react-dom'
12+
const AppRoutes = require('./appRoutes.jsx')
1313

1414
ReactDOM.render(
1515
AppRoutes,
1616
document.getElementById('body')
17-
);
17+
)
1818

1919
// static files
20-
require('file?name=index.html!../index.html');
21-
require('../json/countries.json');
22-
require('../json/form.json');
23-
require('../json/table.json');
24-
require('../json/text-value.json');
25-
require('../json/tree.json');
26-
require('../less/style.less');
20+
require('file?name=index.html!../index.html')
21+
require('../json/countries.json')
22+
require('../json/form.json')
23+
require('../json/table.json')
24+
require('../json/text-value.json')
25+
require('../json/tree.json')
26+
require('../less/style.less')

docs/src/js/appRoutes.jsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"use strict";
1+
'use strict'
22

3-
import {Route, Router} from 'react-router';
4-
import Master from './pages/master.jsx';
5-
import Home from './pages/home.jsx';
6-
import FormBuilder from './pages/formBuilder.jsx';
7-
import createHistory from 'history/lib/createHashHistory';
3+
import {Route, Router} from 'react-router'
4+
import Master from './pages/master.jsx'
5+
import Home from './pages/home.jsx'
6+
import FormBuilder from './pages/formBuilder.jsx'
7+
import createHistory from 'history/lib/createHashHistory'
88

9-
const history = createHistory({ queryKey: false });
10-
let menulist = [];
9+
const history = createHistory({ queryKey: false })
10+
let menulist = []
1111

1212
require('./menuList').forEach(function (menu, index) {
1313
if (typeof menu === 'object' && menu.component) {
1414
menulist.push(
1515
<Route key={index} path={menu.path} component={menu.component} />
16-
);
16+
)
1717
}
18-
});
18+
})
1919

2020
const AppRoutes = (
2121
<Router onUpdate={() => window.scrollTo(0, 0)} history={history}>
@@ -25,6 +25,6 @@ const AppRoutes = (
2525
<Route path="/form-builder" component={FormBuilder} />
2626
</Route>
2727
</Router>
28-
);
28+
)
2929

30-
module.exports = AppRoutes;
30+
module.exports = AppRoutes

docs/src/js/data/array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = ['China', 'America', 'English', 'German', 'Japan', 'Spain'];
1+
module.exports = ['China', 'America', 'English', 'German', 'Japan', 'Spain']

docs/src/js/data/mock.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
'use strict';
1+
'use strict'
22

33
export function createArray (count) {
4-
let obj = [];
5-
while (count--) { obj.push(count.toString()); }
6-
return obj;
4+
let obj = []
5+
while (count--) { obj.push(count.toString()) }
6+
return obj
77
}
88

99
export function createKeyValue (count) {
10-
let obj = {};
11-
while (count--) { obj[count.toString()] = 'item ' + count; }
12-
return obj;
10+
let obj = {}
11+
while (count--) { obj[count.toString()] = 'item ' + count }
12+
return obj
1313
}
1414

1515
export function createObjectArray (count) {
16-
let obj = [];
17-
while (count--) { obj.push({ key: count, value: `item-${count}` }); }
18-
return obj;
16+
let obj = []
17+
while (count--) { obj.push({ key: count, value: `item-${count}` }) }
18+
return obj
1919
}

docs/src/js/data/text-value.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ module.exports = [
66
{ 'id': 'chengdu', 'text': '成都' },
77
{ 'id': 'chongqing', 'text': '重庆' },
88
{ 'id': 'shanghai', 'text': '上海' }
9-
];
9+
]
1010

docs/src/js/menuList.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
'use strict'
22

33
module.exports = [
44
'基础',
@@ -30,4 +30,4 @@ module.exports = [
3030

3131
'Highorder',
3232
{ path: '/fetch', text: 'Fetch', component: require('./pages/fetch.jsx') }
33-
];
33+
]

docs/src/js/navList.jsx

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
"use strict";
1+
'use strict'
22

3-
import { Component, PropTypes } from 'react';
4-
import classnames from 'classnames';
5-
import menuList from './menuList';
3+
import { Component, PropTypes } from 'react'
4+
import classnames from 'classnames'
5+
import menuList from './menuList'
66

77
class NavList extends Component {
88
constructor (props) {
9-
super(props);
9+
super(props)
1010
this.state = {
1111
active: true
12-
};
12+
}
1313
}
1414

1515
getClasses (name, path) {
1616
return classnames(name, {
1717
active: this.context.history.isActive(path)
18-
});
18+
})
1919
}
2020

2121
pathChange (path) {
2222
if (!this.context.history.isActive(path)) {
23-
this.context.history.pushState(null, path);
23+
this.context.history.pushState(null, path)
2424
}
2525
}
2626

@@ -31,38 +31,38 @@ class NavList extends Component {
3131
<li key={i} className="pure-menu-item">
3232
<span className="menu-group-label">{r}</span>
3333
</li>
34-
);
34+
)
3535
} else if (r.path) {
3636
return (
3737
<li key={i} className="pure-menu-item">
38-
<a onClick={this.pathChange.bind(this, r.path)} className={this.getClasses("pure-menu-link", r.path)}>{r.text}</a>
38+
<a onClick={this.pathChange.bind(this, r.path)} className={this.getClasses('pure-menu-link', r.path)}>{r.text}</a>
3939
</li>
40-
);
40+
)
4141
}
42-
}, this);
42+
}, this)
4343

44-
return <ul className="pure-menu-list">{list}</ul>;
44+
return <ul className="pure-menu-list">{list}</ul>
4545
}
4646

4747
render () {
4848
return (
49-
<div className={classnames("nav", {active: this.state.active})}>
49+
<div className={classnames('nav', {active: this.state.active})}>
5050
<div className="nav-inner">
5151
<div ref="list" className="nav-list">
5252
{this.renderRouteList()}
5353
</div>
5454
</div>
5555
</div>
56-
);
56+
)
5757
}
5858
}
5959

6060
NavList.propTypes = {
6161
onToggle: PropTypes.func
62-
};
62+
}
6363

6464
NavList.contextTypes = {
6565
history: PropTypes.object.isRequired
66-
};
66+
}
6767

68-
module.exports = NavList;
68+
module.exports = NavList

docs/src/js/pages/button.jsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
2-
import Code from '../Code';
3-
import Example from '../Example';
4-
import { Cn } from '../Language';
5-
import {Button, Icon} from '../rctui';
1+
import React from 'react'
2+
import Code from '../Code'
3+
import Example from '../Example'
4+
import { Cn } from '../Language'
5+
import {Button, Icon} from '../rctui'
66

77
module.exports = class extends React.Component {
88
render () {
@@ -72,6 +72,6 @@ module.exports = class extends React.Component {
7272
</Example>
7373
</div>
7474
</div>
75-
);
75+
)
7676
}
77-
};
77+
}

docs/src/js/pages/checkbox.jsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use strict";
1+
'use strict'
22

3-
import React from 'react';
4-
import Code from '../Code';
5-
import Example from '../Example';
6-
const {Checkbox} = global.uiRequire();
3+
import React from 'react'
4+
import Code from '../Code'
5+
import Example from '../Example'
6+
const {Checkbox} = global.uiRequire()
77

88
module.exports = class extends React.Component {
99
render () {
@@ -41,11 +41,11 @@ module.exports = class extends React.Component {
4141

4242
<h2 className="subhead">Readonly</h2>
4343
<Example>
44-
<Checkbox checked={true} readOnly={true} text="readonly checkbox" />
45-
<Checkbox readOnly={true} text="readonly checkbox" />
44+
<Checkbox checked readOnly text="readonly checkbox" />
45+
<Checkbox readOnly text="readonly checkbox" />
4646
</Example>
4747
</div>
4848
</div>
49-
);
49+
)
5050
}
5151
}

0 commit comments

Comments
 (0)