Update linting
parent
baf4414719
commit
c3ef6bd25a
|
@ -164,7 +164,7 @@
|
||||||
"no-with": [2],
|
"no-with": [2],
|
||||||
"one-var": [0],
|
"one-var": [0],
|
||||||
"operator-assignment": [0, "always"],
|
"operator-assignment": [0, "always"],
|
||||||
"operator-linebreak": [2, "after"],
|
"operator-linebreak": [2, "before"],
|
||||||
"padded-blocks": [0],
|
"padded-blocks": [0],
|
||||||
"prefer-const": [2],
|
"prefer-const": [2],
|
||||||
"prefer-spread": [2],
|
"prefer-spread": [2],
|
||||||
|
|
|
@ -32,11 +32,11 @@ $shadow-key-penumbra-opacity: 0.14 !default;
|
||||||
$shadow-ambient-shadow-opacity: 0.12 !default;
|
$shadow-ambient-shadow-opacity: 0.12 !default;
|
||||||
|
|
||||||
//-- Depth Shadows
|
//-- Depth Shadows
|
||||||
$zdepth-shadow-1: 0 1px 6px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.24);
|
$zdepth-shadow-1: 0 1px 6px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.24);
|
||||||
$zdepth-shadow-2: 0 3px 10px rgba(0,0,0,0.16), 0 3px 10px rgba(0,0,0,0.23);
|
$zdepth-shadow-2: 0 3px 10px rgba(0,0,0,.16), 0 3px 10px rgba(0,0,0,.23);
|
||||||
$zdepth-shadow-3: 0 10px 30px rgba(0,0,0,0.19), 0 6px 10px rgba(0,0,0,0.23);
|
$zdepth-shadow-3: 0 10px 30px rgba(0,0,0,.19), 0 6px 10px rgba(0,0,0,.23);
|
||||||
$zdepth-shadow-4: 0 14px 45px rgba(0,0,0,0.25), 0 10px 18px rgba(0,0,0,0.22);
|
$zdepth-shadow-4: 0 14px 45px rgba(0,0,0,.25), 0 10px 18px rgba(0,0,0,.22);
|
||||||
$zdepth-shadow-5: 0 19px 60px rgba(0,0,0,0.30), 0 15px 20px rgba(0,0,0,0.22);
|
$zdepth-shadow-5: 0 19px 60px rgba(0,0,0,.3), 0 15px 20px rgba(0,0,0,.22);
|
||||||
|
|
||||||
//-- Animation
|
//-- Animation
|
||||||
$animation-duration: .35s;
|
$animation-duration: .35s;
|
||||||
|
|
|
@ -113,8 +113,8 @@ class Autocomplete extends React.Component {
|
||||||
const query = this.state.query.toLowerCase().trim() || '';
|
const query = this.state.query.toLowerCase().trim() || '';
|
||||||
const values = this.values();
|
const values = this.values();
|
||||||
for (const [key, value] of this.source()) {
|
for (const [key, value] of this.source()) {
|
||||||
if (value.toLowerCase().trim().startsWith(query) &&
|
if (value.toLowerCase().trim().startsWith(query)
|
||||||
(!values.has(key) || !this.props.multiple)) {
|
&& (!values.has(key) || !this.props.multiple)) {
|
||||||
suggest.set(key, value);
|
suggest.set(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,9 @@ class Calendar extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToActive () {
|
scrollToActive () {
|
||||||
this.refs.years.scrollTop =
|
this.refs.years.scrollTop = this.refs.activeYear.offsetTop
|
||||||
this.refs.activeYear.offsetTop -
|
- this.refs.years.offsetHeight / 2
|
||||||
this.refs.years.offsetHeight / 2 +
|
+ this.refs.activeYear.offsetHeight / 2;
|
||||||
this.refs.activeYear.offsetHeight / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDayClick = (day) => {
|
handleDayClick = (day) => {
|
||||||
|
|
|
@ -83,11 +83,12 @@ class Input extends React.Component {
|
||||||
{InputElement}
|
{InputElement}
|
||||||
{icon ? <FontIcon className={style.icon} value={icon} /> : null}
|
{icon ? <FontIcon className={style.icon} value={icon} /> : null}
|
||||||
<span className={style.bar}></span>
|
<span className={style.bar}></span>
|
||||||
{labelText ?
|
{labelText
|
||||||
<label className={labelClassName}>
|
? <label className={labelClassName}>
|
||||||
{labelText}
|
{labelText}
|
||||||
{required ? <span className={style.required}> * </span> : null}
|
{required ? <span className={style.required}> * </span> : null}
|
||||||
</label> : null}
|
</label>
|
||||||
|
: null}
|
||||||
{hint ? <span className={style.hint}>{hint}</span> : null}
|
{hint ? <span className={style.hint}>{hint}</span> : null}
|
||||||
{error ? <span className={style.error}>{error}</span> : null}
|
{error ? <span className={style.error}>{error}</span> : null}
|
||||||
{maxLength ? <span className={style.counter}>{length}/{maxLength}</span> : null}
|
{maxLength ? <span className={style.counter}>{length}/{maxLength}</span> : null}
|
||||||
|
|
|
@ -21,13 +21,11 @@ class Tabs extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
!this.props.disableAnimatedBottomBorder &&
|
!this.props.disableAnimatedBottomBorder && this.updatePointer(this.props.index);
|
||||||
this.updatePointer(this.props.index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
componentWillReceiveProps (nextProps) {
|
||||||
!this.props.disableAnimatedBottomBorder &&
|
!this.props.disableAnimatedBottomBorder && this.updatePointer(nextProps.index);
|
||||||
this.updatePointer(nextProps.index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
|
|
|
@ -11,11 +11,11 @@ function generateDesciption (description) {
|
||||||
function generatePropType (type) {
|
function generatePropType (type) {
|
||||||
let values;
|
let values;
|
||||||
if (Array.isArray(type.value)) {
|
if (Array.isArray(type.value)) {
|
||||||
values = '(`' +
|
values = '(`'
|
||||||
type.value.map(function (typeValue) {
|
+ type.value.map(function (typeValue) {
|
||||||
return typeValue.name || typeValue.value;
|
return typeValue.name || typeValue.value;
|
||||||
}).join('`,`') +
|
}).join('`,`')
|
||||||
'`)';
|
+ '`)';
|
||||||
} else {
|
} else {
|
||||||
values = type.value;
|
values = type.value;
|
||||||
}
|
}
|
||||||
|
@ -33,11 +33,11 @@ function generateProp (propName, prop) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
`| \`${propName}\` ${prop.required ? '(required)' : ''}` +
|
`| \`${propName}\` ${prop.required ? '(required)' : ''}`
|
||||||
`| ${(prop.type ? generatePropType(prop.type) : '')} ` +
|
+ `| ${(prop.type ? generatePropType(prop.type) : '')} `
|
||||||
`| ${(prop.defaultValue ? `\`${prop.defaultValue}\`` : '')} ` +
|
+ `| ${(prop.defaultValue ? `\`${prop.defaultValue}\`` : '')} `
|
||||||
`| ${(prop.description ? prop.description : '')} ` +
|
+ `| ${(prop.description ? prop.description : '')} `
|
||||||
'|'
|
+ '|'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,20 +45,19 @@ function generateProps (props) {
|
||||||
const title = '### Properties';
|
const title = '### Properties';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
`${title}\n` +
|
`${title}\n`
|
||||||
'| Name | Type | Default | Description |\n' +
|
+ '| Name | Type | Default | Description |\n'
|
||||||
'|:-----|:-----|:-----|:-----|\n' +
|
+ '|:-----|:-----|:-----|:-----|\n'
|
||||||
Object.keys(props).sort().map(propName => {
|
+ Object.keys(props).sort().map(propName => {
|
||||||
return generateProp(propName, props[propName]);
|
return generateProp(propName, props[propName]);
|
||||||
}).join('\n')
|
}).join('\n')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateMarkdown (name, reactAPI) {
|
function generateMarkdown (name, reactAPI) {
|
||||||
const markdownString =
|
const markdownString = generateTitle(name) + '\n'
|
||||||
generateTitle(name) + '\n' +
|
+ (reactAPI.description ? generateDesciption(reactAPI.description) + '\n' : '\n')
|
||||||
(reactAPI.description ? generateDesciption(reactAPI.description) + '\n' : '\n') +
|
+ generateProps(reactAPI.props);
|
||||||
generateProps(reactAPI.props);
|
|
||||||
|
|
||||||
return markdownString;
|
return markdownString;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue