diff --git a/.eslintignore b/.eslintignore
index fc0d50a25..96e49da53 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -3,5 +3,10 @@ client/lib
**/*.html
plugins/*
!plugins/coral-plugin-facebook-auth
+!plugins/coral-plugin-auth
!plugins/coral-plugin-respect
+!plugins/coral-plugin-offtopic
+!plugins/coral-plugin-like
+!plugins/coral-plugin-mod
+!plugins/coral-plugin-love
node_modules
diff --git a/plugins/coral-plugin-auth/client/components/ChangeUsername.js b/plugins/coral-plugin-auth/client/components/ChangeUsername.js
index cbb7adba5..ee02b2e17 100644
--- a/plugins/coral-plugin-auth/client/components/ChangeUsername.js
+++ b/plugins/coral-plugin-auth/client/components/ChangeUsername.js
@@ -40,10 +40,10 @@ class ChangeUsernameContainer extends React.Component {
}
}
- handleChange = e => {
+ handleChange = (e) => {
const {name, value} = e.target;
this.setState(
- state => ({
+ (state) => ({
...state,
formData: {
...state.formData,
@@ -57,7 +57,7 @@ class ChangeUsernameContainer extends React.Component {
};
addError = (name, error) => {
- return this.setState(state => ({
+ return this.setState((state) => ({
errors: {
...state.errors,
[name]: error
@@ -75,20 +75,20 @@ class ChangeUsernameContainer extends React.Component {
} else {
const {[name]: prop, ...errors} = this.state.errors; // eslint-disable-line
// Removes Error
- this.setState(state => ({...state, errors}));
+ this.setState((state) => ({...state, errors}));
}
};
isCompleted = () => {
const {formData} = this.state;
- return !Object.keys(formData).filter(prop => !formData[prop].length).length;
+ return !Object.keys(formData).filter((prop) => !formData[prop].length).length;
};
displayErrors = (show = true) => {
this.setState({showErrors: show});
};
- handleSubmitUsername = e => {
+ handleSubmitUsername = (e) => {
e.preventDefault();
const {errors} = this.state;
const {validForm, invalidForm} = this.props;
@@ -127,7 +127,7 @@ const mapStateToProps = ({auth}) => ({
auth: auth.toJS()
});
-const mapDispatchToProps = dispatch =>
+const mapDispatchToProps = (dispatch) =>
bindActionCreators(
{
createUsername,
diff --git a/plugins/coral-plugin-auth/client/components/FakeComment.js b/plugins/coral-plugin-auth/client/components/FakeComment.js
index 01cc6863e..349e7d0a4 100644
--- a/plugins/coral-plugin-auth/client/components/FakeComment.js
+++ b/plugins/coral-plugin-auth/client/components/FakeComment.js
@@ -69,4 +69,5 @@ export const FakeComment = ({username, created_at, body}) => (
-);
\ No newline at end of file
+);
+
diff --git a/plugins/coral-plugin-auth/client/components/ForgotContent.js b/plugins/coral-plugin-auth/client/components/ForgotContent.js
index 2099330bc..8bd6b27a6 100644
--- a/plugins/coral-plugin-auth/client/components/ForgotContent.js
+++ b/plugins/coral-plugin-auth/client/components/ForgotContent.js
@@ -7,7 +7,7 @@ import I18n from 'coral-framework/modules/i18n/i18n';
const lang = new I18n(translations);
class ForgotContent extends React.Component {
- handleSubmit = e => {
+ handleSubmit = (e) => {
e.preventDefault();
this.props.fetchForgotPassword(this.emailInput.value);
};
@@ -25,7 +25,7 @@ class ForgotContent extends React.Component {
(this.emailInput = input)}
+ ref={(input) => (this.emailInput = input)}
type="text"
style={{fontSize: 16}}
id="email"
diff --git a/plugins/coral-plugin-auth/client/components/SignInButton.js b/plugins/coral-plugin-auth/client/components/SignInButton.js
index b54cbfedd..881233c83 100644
--- a/plugins/coral-plugin-auth/client/components/SignInButton.js
+++ b/plugins/coral-plugin-auth/client/components/SignInButton.js
@@ -18,7 +18,7 @@ const mapStateToProps = ({auth}) => ({
loggedIn: auth.toJS().loggedIn
});
-const mapDispatchToProps = dispatch =>
+const mapDispatchToProps = (dispatch) =>
bindActionCreators({showSignInDialog}, dispatch);
export default connect(mapStateToProps, mapDispatchToProps)(SignInButton);
diff --git a/plugins/coral-plugin-auth/client/components/SignInContainer.js b/plugins/coral-plugin-auth/client/components/SignInContainer.js
index cbff000ee..523f343ed 100644
--- a/plugins/coral-plugin-auth/client/components/SignInContainer.js
+++ b/plugins/coral-plugin-auth/client/components/SignInContainer.js
@@ -61,7 +61,8 @@ class SignInContainer extends React.Component {
window.removeEventListener('storage', this.handleAuth);
}
- handleAuth = e => {
+ handleAuth = (e) => {
+
// Listening to FB changes
// FB localStorage key is 'auth'
const authCallback = this.props.facebookCallback;
@@ -72,10 +73,10 @@ class SignInContainer extends React.Component {
}
};
- handleChange = e => {
+ handleChange = (e) => {
const {name, value} = e.target;
this.setState(
- state => ({
+ (state) => ({
...state,
formData: {
...state.formData,
@@ -88,12 +89,12 @@ class SignInContainer extends React.Component {
);
};
- handleChangeEmail = e => {
+ handleChangeEmail = (e) => {
const {value} = e.target;
this.setState({emailToBeResent: value});
};
- handleResendVerification = e => {
+ handleResendVerification = (e) => {
e.preventDefault();
this.props
.requestConfirmEmail(
@@ -102,6 +103,7 @@ class SignInContainer extends React.Component {
)
.then(() => {
setTimeout(() => {
+
// allow success UI to be shown for a second, and then close the modal
this.props.hideSignInDialog();
}, 2500);
@@ -109,7 +111,7 @@ class SignInContainer extends React.Component {
};
addError = (name, error) => {
- return this.setState(state => ({
+ return this.setState((state) => ({
errors: {
...state.errors,
[name]: error
@@ -133,20 +135,20 @@ class SignInContainer extends React.Component {
} else {
const {[name]: prop, ...errors} = this.state.errors; // eslint-disable-line
// Removes Error
- this.setState(state => ({...state, errors}));
+ this.setState((state) => ({...state, errors}));
}
};
isCompleted = () => {
const {formData} = this.state;
- return !Object.keys(formData).filter(prop => !formData[prop].length).length;
+ return !Object.keys(formData).filter((prop) => !formData[prop].length).length;
};
displayErrors = (show = true) => {
this.setState({showErrors: show});
};
- handleSignUp = e => {
+ handleSignUp = (e) => {
e.preventDefault();
const {errors} = this.state;
const {fetchSignUp, validForm, invalidForm} = this.props;
@@ -159,7 +161,7 @@ class SignInContainer extends React.Component {
}
};
- handleSignIn = e => {
+ handleSignIn = (e) => {
e.preventDefault();
this.props.fetchSignIn(this.state.formData);
};
@@ -183,17 +185,16 @@ class SignInContainer extends React.Component {
}
}
-const mapStateToProps = state => ({
+const mapStateToProps = (state) => ({
auth: state.auth.toJS()
});
-const mapDispatchToProps = dispatch =>
+const mapDispatchToProps = (dispatch) =>
bindActionCreators(
{
checkLogin,
facebookCallback,
fetchSignUp,
- fetchSignUp,
fetchSignIn,
fetchSignInFacebook,
fetchSignUpFacebook,
diff --git a/plugins/coral-plugin-auth/client/components/SignUpContent.js b/plugins/coral-plugin-auth/client/components/SignUpContent.js
index 5f2dd36ea..fd885d1fe 100644
--- a/plugins/coral-plugin-auth/client/components/SignUpContent.js
+++ b/plugins/coral-plugin-auth/client/components/SignUpContent.js
@@ -1,5 +1,5 @@
import styles from './styles.css';
-import React, {PropTypes} from 'react';
+import React from 'react';
import translations from '../translations';
import I18n from 'coral-framework/modules/i18n/i18n';
import {Button, TextField, Spinner, Success, Alert} from 'coral-ui';
diff --git a/plugins/coral-plugin-auth/client/components/UserBox.js b/plugins/coral-plugin-auth/client/components/UserBox.js
index d8adf2380..cfd0fc9d2 100644
--- a/plugins/coral-plugin-auth/client/components/UserBox.js
+++ b/plugins/coral-plugin-auth/client/components/UserBox.js
@@ -4,7 +4,7 @@ import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import translations from '../translations';
import I18n from 'coral-framework/modules/i18n/i18n';
-import {showSignInDialog, logout} from 'coral-framework/actions/auth';
+import {logout} from 'coral-framework/actions/auth';
const lang = new I18n(translations);
const UserBox = ({loggedIn, user, logout, onShowProfile}) => (
@@ -23,12 +23,12 @@ const UserBox = ({loggedIn, user, logout, onShowProfile}) => (
);
-const mapStateToProps = ({auth, user}) => ({
+const mapStateToProps = ({auth}) => ({
loggedIn: auth.toJS().loggedIn,
user: auth.toJS().user
});
-const mapDispatchToProps = dispatch =>
+const mapDispatchToProps = (dispatch) =>
bindActionCreators({logout}, dispatch);
export default connect(mapStateToProps, mapDispatchToProps)(UserBox);
diff --git a/plugins/coral-plugin-auth/client/index.js b/plugins/coral-plugin-auth/client/index.js
index 41fa3adbe..c41c097bd 100644
--- a/plugins/coral-plugin-auth/client/index.js
+++ b/plugins/coral-plugin-auth/client/index.js
@@ -8,4 +8,5 @@ export default {
stream: [UserBox, SignInButton, ChangeUserNameContainer],
login: [SignInContainer]
}
-};
\ No newline at end of file
+};
+
diff --git a/plugins/coral-plugin-auth/index.js b/plugins/coral-plugin-auth/index.js
index a09954537..85dfb349b 100644
--- a/plugins/coral-plugin-auth/index.js
+++ b/plugins/coral-plugin-auth/index.js
@@ -1 +1,2 @@
-module.exports = {};
\ No newline at end of file
+module.exports = {};
+
diff --git a/plugins/coral-plugin-like/client/components/LikeButton.js b/plugins/coral-plugin-like/client/components/LikeButton.js
index b91ffd42a..0a88d35a4 100644
--- a/plugins/coral-plugin-like/client/components/LikeButton.js
+++ b/plugins/coral-plugin-like/client/components/LikeButton.js
@@ -1,19 +1,18 @@
-import React, { Component } from 'react';
+import React, {Component} from 'react';
import styles from './style.css';
-import Icon from './Icon';
-import { I18n } from 'coral-framework';
+import {I18n} from 'coral-framework';
import cn from 'classnames';
import translations from '../translations.json';
-import { getMyActionSummary, getTotalActionCount } from 'coral-framework/utils';
+import {getMyActionSummary, getTotalActionCount} from 'coral-framework/utils';
const lang = new I18n(translations);
const name = 'coral-plugin-like';
class LikeButton extends Component {
handleClick = () => {
- const { postLike, showSignInDialog, deleteAction } = this.props;
- const { root: { me }, comment } = this.props;
+ const {postLike, showSignInDialog, deleteAction} = this.props;
+ const {root: {me}, comment} = this.props;
const myLikeActionSummary = getMyActionSummary(
'LikeActionSummary',
@@ -42,7 +41,7 @@ class LikeButton extends Component {
};
render() {
- const { comment } = this.props;
+ const {comment} = this.props;
if (!comment) {
return null;
@@ -56,7 +55,7 @@ class LikeButton extends Component {