Resolve linter issues

This commit is contained in:
Chi Vinh Le
2018-06-05 04:28:54 +02:00
parent d9a1d739dc
commit ccff6ed63b
148 changed files with 1171 additions and 265 deletions
@@ -142,7 +142,9 @@ class AddEmailAddressDialog extends React.Component {
render() {
const { errors, formData, showErrors, step } = this.state;
const { root: { settings } } = this.props;
const {
root: { settings },
} = this.props;
return (
<Dialog className={styles.dialog} open={true}>
@@ -135,7 +135,11 @@ class ChangePassword extends React.Component {
};
onForgotPassword = async () => {
const { root: { me: { email } } } = this.props;
const {
root: {
me: { email },
},
} = this.props;
try {
await this.props.forgotPassword(email);
@@ -114,7 +114,11 @@ class Profile extends React.Component {
isSaveEnabled = () => {
const { formData } = this.state;
const { root: { me: { username, email } } } = this.props;
const {
root: {
me: { username, email },
},
} = this.props;
const formHasErrors = !!Object.keys(this.state.errors).length;
const validUsername =
formData.newUsername && formData.newUsername !== username;
@@ -166,7 +170,13 @@ class Profile extends React.Component {
render() {
const {
root: { me: { username, email, state: { status } } },
root: {
me: {
username,
email,
state: { status },
},
},
notify,
} = this.props;
const { editing, formData, showDialog } = this.state;
@@ -36,7 +36,10 @@ const withData = withFragments({
});
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withAttachLocalAuth,
withData,
excludeIf(
@@ -21,7 +21,10 @@ const withData = withFragments({
});
export default compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withChangePassword,
withForgotPassword,
withData
@@ -32,7 +32,10 @@ const withData = withFragments({
});
export default compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withSetUsername,
withUpdateEmailAddress,
withData
@@ -18,7 +18,10 @@ async function updateUserEmailAddress(ctx, email, confirmPassword) {
const {
user,
loaders: { Settings },
connectors: { models: { User }, services: { Mailer, I18n, Users } },
connectors: {
models: { User },
services: { Mailer, I18n, Users },
},
} = ctx;
// Ensure that the user has a local profile associated with their account.
@@ -27,7 +30,7 @@ async function updateUserEmailAddress(ctx, email, confirmPassword) {
}
// Ensure that the password provided matches what we have on file.
if (!await user.verifyPassword(confirmPassword)) {
if (!(await user.verifyPassword(confirmPassword))) {
throw new ErrIncorrectPassword();
}
@@ -81,7 +84,13 @@ async function updateUserEmailAddress(ctx, email, confirmPassword) {
// attachUserLocalAuth will attach a new local profile to an existing user.
async function attachUserLocalAuth(ctx, email, password) {
const { user, connectors: { models: { User }, services: { Users } } } = ctx;
const {
user,
connectors: {
models: { User },
services: { Users },
},
} = ctx;
// Ensure that the current user doesn't already have a local account
// associated with them.