Skip to content

Commit c3ef6bd

Browse files
committed
Update linting
1 parent baf4414 commit c3ef6bd

File tree

7 files changed

+35
-38
lines changed

7 files changed

+35
-38
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"no-with": [2],
165165
"one-var": [0],
166166
"operator-assignment": [0, "always"],
167-
"operator-linebreak": [2, "after"],
167+
"operator-linebreak": [2, "before"],
168168
"padded-blocks": [0],
169169
"prefer-const": [2],
170170
"prefer-spread": [2],

components/_globals.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ $shadow-key-penumbra-opacity: 0.14 !default;
3232
$shadow-ambient-shadow-opacity: 0.12 !default;
3333

3434
//-- Depth Shadows
35-
$zdepth-shadow-1: 0 1px 6px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.24);
36-
$zdepth-shadow-2: 0 3px 10px rgba(0,0,0,0.16), 0 3px 10px rgba(0,0,0,0.23);
37-
$zdepth-shadow-3: 0 10px 30px rgba(0,0,0,0.19), 0 6px 10px rgba(0,0,0,0.23);
38-
$zdepth-shadow-4: 0 14px 45px rgba(0,0,0,0.25), 0 10px 18px rgba(0,0,0,0.22);
39-
$zdepth-shadow-5: 0 19px 60px rgba(0,0,0,0.30), 0 15px 20px rgba(0,0,0,0.22);
35+
$zdepth-shadow-1: 0 1px 6px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.24);
36+
$zdepth-shadow-2: 0 3px 10px rgba(0,0,0,.16), 0 3px 10px rgba(0,0,0,.23);
37+
$zdepth-shadow-3: 0 10px 30px rgba(0,0,0,.19), 0 6px 10px rgba(0,0,0,.23);
38+
$zdepth-shadow-4: 0 14px 45px rgba(0,0,0,.25), 0 10px 18px rgba(0,0,0,.22);
39+
$zdepth-shadow-5: 0 19px 60px rgba(0,0,0,.3), 0 15px 20px rgba(0,0,0,.22);
4040

4141
//-- Animation
4242
$animation-duration: .35s;

components/autocomplete/Autocomplete.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class Autocomplete extends React.Component {
113113
const query = this.state.query.toLowerCase().trim() || '';
114114
const values = this.values();
115115
for (const [key, value] of this.source()) {
116-
if (value.toLowerCase().trim().startsWith(query) &&
117-
(!values.has(key) || !this.props.multiple)) {
116+
if (value.toLowerCase().trim().startsWith(query)
117+
&& (!values.has(key) || !this.props.multiple)) {
118118
suggest.set(key, value);
119119
}
120120
}

components/date_picker/Calendar.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ class Calendar extends React.Component {
3333
}
3434

3535
scrollToActive () {
36-
this.refs.years.scrollTop =
37-
this.refs.activeYear.offsetTop -
38-
this.refs.years.offsetHeight / 2 +
39-
this.refs.activeYear.offsetHeight / 2;
36+
this.refs.years.scrollTop = this.refs.activeYear.offsetTop
37+
- this.refs.years.offsetHeight / 2
38+
+ this.refs.activeYear.offsetHeight / 2;
4039
}
4140

4241
handleDayClick = (day) => {

components/input/Input.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ class Input extends React.Component {
8383
{InputElement}
8484
{icon ? <FontIcon className={style.icon} value={icon} /> : null}
8585
<span className={style.bar}></span>
86-
{labelText ?
87-
<label className={labelClassName}>
88-
{labelText}
89-
{required ? <span className={style.required}> * </span> : null}
90-
</label> : null}
86+
{labelText
87+
? <label className={labelClassName}>
88+
{labelText}
89+
{required ? <span className={style.required}> * </span> : null}
90+
</label>
91+
: null}
9192
{hint ? <span className={style.hint}>{hint}</span> : null}
9293
{error ? <span className={style.error}>{error}</span> : null}
9394
{maxLength ? <span className={style.counter}>{length}/{maxLength}</span> : null}

components/tabs/Tabs.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ class Tabs extends React.Component {
2121
};
2222

2323
componentDidMount () {
24-
!this.props.disableAnimatedBottomBorder &&
25-
this.updatePointer(this.props.index);
24+
!this.props.disableAnimatedBottomBorder && this.updatePointer(this.props.index);
2625
}
2726

2827
componentWillReceiveProps (nextProps) {
29-
!this.props.disableAnimatedBottomBorder &&
30-
this.updatePointer(nextProps.index);
28+
!this.props.disableAnimatedBottomBorder && this.updatePointer(nextProps.index);
3129
}
3230

3331
componentWillUnmount () {

tools/generateMarkdown.js

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ function generateDesciption (description) {
1111
function generatePropType (type) {
1212
let values;
1313
if (Array.isArray(type.value)) {
14-
values = '(`' +
15-
type.value.map(function (typeValue) {
14+
values = '(`'
15+
+ type.value.map(function (typeValue) {
1616
return typeValue.name || typeValue.value;
17-
}).join('`,`') +
18-
'`)';
17+
}).join('`,`')
18+
+ '`)';
1919
} else {
2020
values = type.value;
2121
}
@@ -33,32 +33,31 @@ function generateProp (propName, prop) {
3333
}
3434

3535
return (
36-
`| \`${propName}\` ${prop.required ? '(required)' : ''}` +
37-
`| ${(prop.type ? generatePropType(prop.type) : '')} ` +
38-
`| ${(prop.defaultValue ? `\`${prop.defaultValue}\`` : '')} ` +
39-
`| ${(prop.description ? prop.description : '')} ` +
40-
'|'
36+
`| \`${propName}\` ${prop.required ? '(required)' : ''}`
37+
+ `| ${(prop.type ? generatePropType(prop.type) : '')} `
38+
+ `| ${(prop.defaultValue ? `\`${prop.defaultValue}\`` : '')} `
39+
+ `| ${(prop.description ? prop.description : '')} `
40+
+ '|'
4141
);
4242
}
4343

4444
function generateProps (props) {
4545
const title = '### Properties';
4646

4747
return (
48-
`${title}\n` +
49-
'| Name | Type | Default | Description |\n' +
50-
'|:-----|:-----|:-----|:-----|\n' +
51-
Object.keys(props).sort().map(propName => {
48+
`${title}\n`
49+
+ '| Name | Type | Default | Description |\n'
50+
+ '|:-----|:-----|:-----|:-----|\n'
51+
+ Object.keys(props).sort().map(propName => {
5252
return generateProp(propName, props[propName]);
5353
}).join('\n')
5454
);
5555
}
5656

5757
function generateMarkdown (name, reactAPI) {
58-
const markdownString =
59-
generateTitle(name) + '\n' +
60-
(reactAPI.description ? generateDesciption(reactAPI.description) + '\n' : '\n') +
61-
generateProps(reactAPI.props);
58+
const markdownString = generateTitle(name) + '\n'
59+
+ (reactAPI.description ? generateDesciption(reactAPI.description) + '\n' : '\n')
60+
+ generateProps(reactAPI.props);
6261

6362
return markdownString;
6463
}

0 commit comments

Comments
 (0)