fix many linting errors
This commit is contained in:
parent
90c76c1d08
commit
617cffc869
5 changed files with 38 additions and 32 deletions
19
.eslintrc
19
.eslintrc
|
@ -6,11 +6,6 @@
|
|||
"node": true,
|
||||
"mocha": true
|
||||
},
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"es6": true,
|
||||
"classes": true
|
||||
},
|
||||
"rules": {
|
||||
"linebreak-style": 0,
|
||||
"react/no-multi-comp": 0,
|
||||
|
@ -51,6 +46,20 @@
|
|||
"to"
|
||||
]
|
||||
}
|
||||
],
|
||||
"jsx-a11y/label-has-for": [
|
||||
2,
|
||||
{
|
||||
"components": [
|
||||
"Label"
|
||||
],
|
||||
"required": {
|
||||
"every": [
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"allowChildren": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
|
|
|
@ -41,12 +41,12 @@ class CopyableInput extends React.Component {
|
|||
ref={(element) => { this.tooltip = element; }}
|
||||
onMouseLeave={this.onMouseLeaveHandler}
|
||||
>
|
||||
<label className="copyable-input__label" htmlFor="copyable-input__value">
|
||||
<label className="copyable-input__label" htmlFor={`copyable-input__value-${label}`}>
|
||||
{label}
|
||||
<input
|
||||
type="text"
|
||||
className="copyable-input__value"
|
||||
id="copyable-input__value"
|
||||
id={`copyable-input__value-${label}`}
|
||||
value={value}
|
||||
ref={(element) => { this.input = element; }}
|
||||
readOnly
|
||||
|
|
|
@ -9,11 +9,12 @@ class EditorAccessibility extends React.Component {
|
|||
const messages = [];
|
||||
if (this.props.lintMessages.length > 0) {
|
||||
this.props.lintMessages.forEach((lintMessage, i) => {
|
||||
messages.push(<li key={lintMessage.id}>
|
||||
messages.push((
|
||||
<li key={lintMessage.id}>
|
||||
{lintMessage.severity} in line
|
||||
{lintMessage.line} :
|
||||
{lintMessage.message}
|
||||
</li>);
|
||||
</li>));
|
||||
});
|
||||
} else {
|
||||
messages.push(<li tabIndex="0" key={0}> There are no lint messages </li>);
|
||||
|
|
|
@ -63,7 +63,7 @@ export function validateAndLoginUser(previousPath, formProps, dispatch) {
|
|||
resolve();
|
||||
})
|
||||
.catch((response) => {
|
||||
reject({ password: response.data.message, _error: 'Login failed!' });
|
||||
reject({ password: response.data.message, _error: 'Login failed!' }); // eslint-disable-line
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -212,5 +212,5 @@ export function updateSettings(formValues) {
|
|||
dispatch(updateSettingsSuccess(response.data));
|
||||
browserHistory.push('/');
|
||||
})
|
||||
.catch(response => Promise.reject({ currentPassword: response.data.error }));
|
||||
.catch(response => Promise.reject(new Error(response.data.error)));
|
||||
}
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
.copyable-input__value {
|
||||
width: 100%;
|
||||
font-size: #{16 / $base-font-size}rem;
|
||||
margin-top: #{5 / $base-font-size}rem;
|
||||
}
|
||||
|
||||
.copyable-input__label {
|
||||
width: 100%;
|
||||
font-size: #{12 / $base-font-size}rem;
|
||||
padding-bottom: #{5 / $base-font-size}rem;
|
||||
@include themify() {
|
||||
color: getThemifyVariable('inactive-text-color');
|
||||
}
|
||||
|
@ -34,7 +34,6 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.copyable-input {
|
||||
.tooltipped::after {
|
||||
@include themify() {
|
||||
background-color: getThemifyVariable('button-background-hover-color');
|
||||
|
@ -42,7 +41,6 @@
|
|||
}
|
||||
font-family: Montserrat, sans-serif;
|
||||
font-size: #{12 / $base-font-size}rem;
|
||||
bottom: #{41 / $base-font-size}rem;
|
||||
}
|
||||
|
||||
.tooltipped-n::before,
|
||||
|
@ -52,6 +50,4 @@
|
|||
color: getThemifyVariable('button-background-hover-color');
|
||||
border-top-color: getThemifyVariable('button-background-hover-color');
|
||||
}
|
||||
top: #{14 / $base-font-size}rem;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue