diff --git a/bin/cli-plugins b/bin/cli-plugins
index f2e76de21..85132c39d 100755
--- a/bin/cli-plugins
+++ b/bin/cli-plugins
@@ -329,8 +329,7 @@ async function createSeedPlugin() {
if (answers.addPluginsJson) {
const pluginsJson = path.resolve(__dirname, '..', 'plugins.json');
- fs
- .readJson(pluginsJson)
+ fs.readJson(pluginsJson)
.then(j => {
// This is a client-side plugin, let's push this.
if (answers.client) {
diff --git a/bin/cli-token b/bin/cli-token
index 0d4dc4e10..2590ec106 100755
--- a/bin/cli-token
+++ b/bin/cli-token
@@ -49,7 +49,10 @@ async function revokeToken(tokenID) {
async function createToken(userID, tokenName) {
try {
- let { pat: { id }, jwt } = await TokensService.create(userID, tokenName);
+ let {
+ pat: { id },
+ jwt,
+ } = await TokensService.create(userID, tokenName);
console.log(`Created Token[${id}] for User[${userID}] = ${jwt}`);
diff --git a/client/coral-admin/src/components/BanUserDialog.js b/client/coral-admin/src/components/BanUserDialog.js
index f211a9f2c..fd8636320 100644
--- a/client/coral-admin/src/components/BanUserDialog.js
+++ b/client/coral-admin/src/components/BanUserDialog.js
@@ -19,7 +19,9 @@ class BanUserDialog extends React.Component {
}
handleMessageChange = e => {
- const { target: { value: message } } = e;
+ const {
+ target: { value: message },
+ } = e;
this.setState({ message });
};
diff --git a/client/coral-admin/src/components/KarmaTooltip.js b/client/coral-admin/src/components/KarmaTooltip.js
index 9c4184afd..d27597325 100644
--- a/client/coral-admin/src/components/KarmaTooltip.js
+++ b/client/coral-admin/src/components/KarmaTooltip.js
@@ -27,7 +27,9 @@ class KarmaTooltip extends React.Component {
};
render() {
- const { thresholds: { unreliable } } = this.props;
+ const {
+ thresholds: { unreliable },
+ } = this.props;
const { menuVisible } = this.state;
return (
@@ -68,6 +70,7 @@ class KarmaTooltip extends React.Component {
className={styles.link}
href={t('user_detail.karma_docs_link')}
target="_blank"
+ rel="noopener noreferrer"
>
{t('user_detail.learn_more')}
diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js
index 92157f4fd..d8193c121 100644
--- a/client/coral-admin/src/components/UserDetail.js
+++ b/client/coral-admin/src/components/UserDetail.js
@@ -159,7 +159,7 @@ class UserDetail extends React.Component {
} = this.props;
// if totalComments is 0, you're dividing by zero
- let rejectedPercent = rejectedComments / totalComments * 100;
+ let rejectedPercent = (rejectedComments / totalComments) * 100;
if (rejectedPercent === Infinity || isNaN(rejectedPercent)) {
rejectedPercent = 0;
diff --git a/client/coral-admin/src/components/UserDetailComment.js b/client/coral-admin/src/components/UserDetailComment.js
index 41fb87b28..e8472219a 100644
--- a/client/coral-admin/src/components/UserDetailComment.js
+++ b/client/coral-admin/src/components/UserDetailComment.js
@@ -114,6 +114,7 @@ class UserDetailComment extends React.Component {
className={styles.external}
href={`${comment.asset.url}?commentId=${comment.id}`}
target="_blank"
+ rel="noopener noreferrer"
>
{t('comment.view_context')}
diff --git a/client/coral-admin/src/components/UserDetailCommentList.js b/client/coral-admin/src/components/UserDetailCommentList.js
index 3a31ee3f9..3a5c7462d 100644
--- a/client/coral-admin/src/components/UserDetailCommentList.js
+++ b/client/coral-admin/src/components/UserDetailCommentList.js
@@ -10,7 +10,10 @@ import ApproveButton from './ApproveButton';
const UserDetailCommentList = props => {
const {
root,
- root: { user, comments: { nodes, hasNextPage } },
+ root: {
+ user,
+ comments: { nodes, hasNextPage },
+ },
acceptComment,
rejectComment,
selectedCommentIds,
diff --git a/client/coral-admin/src/containers/BanUserDialog.js b/client/coral-admin/src/containers/BanUserDialog.js
index c869626c9..e1b053337 100644
--- a/client/coral-admin/src/containers/BanUserDialog.js
+++ b/client/coral-admin/src/containers/BanUserDialog.js
@@ -77,7 +77,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withBanUser,
withSetCommentStatus
)(BanUserDialogContainer);
diff --git a/client/coral-admin/src/containers/Layout.js b/client/coral-admin/src/containers/Layout.js
index d8ca11732..22c624b7d 100644
--- a/client/coral-admin/src/containers/Layout.js
+++ b/client/coral-admin/src/containers/Layout.js
@@ -81,4 +81,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
-export default connect(mapStateToProps, mapDispatchToProps)(LayoutContainer);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(LayoutContainer);
diff --git a/client/coral-admin/src/containers/RejectUsernameDialog.js b/client/coral-admin/src/containers/RejectUsernameDialog.js
index 24d1cd2d3..ec996a9d5 100644
--- a/client/coral-admin/src/containers/RejectUsernameDialog.js
+++ b/client/coral-admin/src/containers/RejectUsernameDialog.js
@@ -83,7 +83,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withRejectUsername,
withPostFlag({ notifyOnError: false })
)(RejectUsernameDialogContainer);
diff --git a/client/coral-admin/src/containers/SignIn.js b/client/coral-admin/src/containers/SignIn.js
index 1af857294..365b32db3 100644
--- a/client/coral-admin/src/containers/SignIn.js
+++ b/client/coral-admin/src/containers/SignIn.js
@@ -55,4 +55,7 @@ SignInContainer.propTypes = {
requireRecaptcha: PropTypes.bool.isRequired,
};
-export default compose(withSignIn, withPopupAuthHandler)(SignInContainer);
+export default compose(
+ withSignIn,
+ withPopupAuthHandler
+)(SignInContainer);
diff --git a/client/coral-admin/src/containers/SuspendUserDialog.js b/client/coral-admin/src/containers/SuspendUserDialog.js
index f03d48f52..1d3d5d2c0 100644
--- a/client/coral-admin/src/containers/SuspendUserDialog.js
+++ b/client/coral-admin/src/containers/SuspendUserDialog.js
@@ -86,7 +86,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSuspendUser,
withSetCommentStatus,
withOrganizationName
diff --git a/client/coral-admin/src/containers/UserDetail.js b/client/coral-admin/src/containers/UserDetail.js
index 03ffee007..e9ffea4d1 100644
--- a/client/coral-admin/src/containers/UserDetail.js
+++ b/client/coral-admin/src/containers/UserDetail.js
@@ -294,7 +294,10 @@ const mapDispatchToProps = dispatch => ({
});
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withUserDetailQuery,
withSetCommentStatus,
withUnbanUser,
diff --git a/client/coral-admin/src/graphql/index.js b/client/coral-admin/src/graphql/index.js
index b51897a4b..9fca9f497 100644
--- a/client/coral-admin/src/graphql/index.js
+++ b/client/coral-admin/src/graphql/index.js
@@ -66,7 +66,11 @@ export default {
});
},
}),
- SuspendUser: ({ variables: { input: { id, until } } }) => ({
+ SuspendUser: ({
+ variables: {
+ input: { id, until },
+ },
+ }) => ({
update: proxy => {
const fragmentId = `User_${id}`;
@@ -92,7 +96,11 @@ export default {
});
},
}),
- UnsuspendUser: ({ variables: { input: { id } } }) => ({
+ UnsuspendUser: ({
+ variables: {
+ input: { id },
+ },
+ }) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
@@ -117,7 +125,11 @@ export default {
});
},
}),
- BanUser: ({ variables: { input: { id } } }) => ({
+ BanUser: ({
+ variables: {
+ input: { id },
+ },
+ }) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
@@ -142,7 +154,11 @@ export default {
});
},
}),
- UnbanUser: ({ variables: { input: { id } } }) => ({
+ UnbanUser: ({
+ variables: {
+ input: { id },
+ },
+ }) => ({
update: proxy => {
const fragmentId = `User_${id}`;
const data = proxy.readFragment({
diff --git a/client/coral-admin/src/routes/Community/containers/FlaggedAccounts.js b/client/coral-admin/src/routes/Community/containers/FlaggedAccounts.js
index 60ae4ee99..328030390 100644
--- a/client/coral-admin/src/routes/Community/containers/FlaggedAccounts.js
+++ b/client/coral-admin/src/routes/Community/containers/FlaggedAccounts.js
@@ -46,7 +46,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameFlagged: user } } }
+ {
+ subscriptionData: {
+ data: { usernameFlagged: user },
+ },
+ }
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -62,7 +66,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_APPROVED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameApproved: user } } }
+ {
+ subscriptionData: {
+ data: { usernameApproved: user },
+ },
+ }
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -78,7 +86,11 @@ class FlaggedAccountsContainer extends Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameRejected: user } } }
+ {
+ subscriptionData: {
+ data: { usernameRejected: user },
+ },
+ }
) => {
return handleFlaggedAccountsChange(prev, user, () => {
const msg = t(
@@ -96,7 +108,9 @@ class FlaggedAccountsContainer extends Component {
prev,
{
subscriptionData: {
- data: { usernameChanged: { previousUsername, user } },
+ data: {
+ usernameChanged: { previousUsername, user },
+ },
},
}
) => {
@@ -297,7 +311,10 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withApproveUsername,
withQuery(
gql`
diff --git a/client/coral-admin/src/routes/Community/containers/Indicator.js b/client/coral-admin/src/routes/Community/containers/Indicator.js
index 3c078a8d7..3db93cdd0 100644
--- a/client/coral-admin/src/routes/Community/containers/Indicator.js
+++ b/client/coral-admin/src/routes/Community/containers/Indicator.js
@@ -15,7 +15,11 @@ class IndicatorContainer extends Component {
document: USERNAME_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameFlagged: user } } }
+ {
+ subscriptionData: {
+ data: { usernameFlagged: user },
+ },
+ }
) => {
return handleIndicatorChange(prev, user);
},
@@ -24,7 +28,11 @@ class IndicatorContainer extends Component {
document: USERNAME_APPROVED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameApproved: user } } }
+ {
+ subscriptionData: {
+ data: { usernameApproved: user },
+ },
+ }
) => {
return handleIndicatorChange(prev, user);
},
@@ -33,7 +41,11 @@ class IndicatorContainer extends Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameRejected: user } } }
+ {
+ subscriptionData: {
+ data: { usernameRejected: user },
+ },
+ }
) => {
return handleIndicatorChange(prev, user);
},
@@ -42,7 +54,13 @@ class IndicatorContainer extends Component {
document: USERNAME_CHANGED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { usernameChanged: { user } } } }
+ {
+ subscriptionData: {
+ data: {
+ usernameChanged: { user },
+ },
+ },
+ }
) => {
return handleIndicatorChange(prev, user);
},
diff --git a/client/coral-admin/src/routes/Community/containers/People.js b/client/coral-admin/src/routes/Community/containers/People.js
index f8271b236..63cd28833 100644
--- a/client/coral-admin/src/routes/Community/containers/People.js
+++ b/client/coral-admin/src/routes/Community/containers/People.js
@@ -200,7 +200,10 @@ const SEARCH_QUERY = gql`
`;
export default compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withSetUserRole,
withUnsuspendUser,
withUnbanUser,
diff --git a/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js b/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
index 325eadfb5..a09bf117e 100644
--- a/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
+++ b/client/coral-admin/src/routes/Community/containers/RejectUsernameDialog.js
@@ -19,6 +19,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withRejectUsername
)(RejectUsernameDialog);
diff --git a/client/coral-admin/src/routes/Configure/containers/Configure.js b/client/coral-admin/src/routes/Configure/containers/Configure.js
index 3d2789974..758a78963 100644
--- a/client/coral-admin/src/routes/Configure/containers/Configure.js
+++ b/client/coral-admin/src/routes/Configure/containers/Configure.js
@@ -174,7 +174,10 @@ const mapDispatchToProps = dispatch =>
export default compose(
withRouter,
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withUpdateSettings,
withConfigureQuery,
withMergedSettings('root.settings', 'pending', 'mergedSettings')
diff --git a/client/coral-admin/src/routes/Configure/containers/ModerationSettings.js b/client/coral-admin/src/routes/Configure/containers/ModerationSettings.js
index 8882477d1..80f1abe9c 100644
--- a/client/coral-admin/src/routes/Configure/containers/ModerationSettings.js
+++ b/client/coral-admin/src/routes/Configure/containers/ModerationSettings.js
@@ -42,7 +42,10 @@ export default compose(
}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
diff --git a/client/coral-admin/src/routes/Configure/containers/OrganizationSettings.js b/client/coral-admin/src/routes/Configure/containers/OrganizationSettings.js
index 79ab70f69..6f3299dea 100644
--- a/client/coral-admin/src/routes/Configure/containers/OrganizationSettings.js
+++ b/client/coral-admin/src/routes/Configure/containers/OrganizationSettings.js
@@ -37,7 +37,10 @@ export default compose(
}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
diff --git a/client/coral-admin/src/routes/Configure/containers/StreamSettings.js b/client/coral-admin/src/routes/Configure/containers/StreamSettings.js
index faffb1aec..315640c9d 100644
--- a/client/coral-admin/src/routes/Configure/containers/StreamSettings.js
+++ b/client/coral-admin/src/routes/Configure/containers/StreamSettings.js
@@ -45,7 +45,10 @@ export default compose(
}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
diff --git a/client/coral-admin/src/routes/Configure/containers/TechSettings.js b/client/coral-admin/src/routes/Configure/containers/TechSettings.js
index 7fbe81cdb..1460740ef 100644
--- a/client/coral-admin/src/routes/Configure/containers/TechSettings.js
+++ b/client/coral-admin/src/routes/Configure/containers/TechSettings.js
@@ -39,7 +39,10 @@ export default compose(
}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
mapProps(({ root, settings, updatePending, errors, ...rest }) => ({
slotPassthrough: {
root,
diff --git a/client/coral-admin/src/routes/Install/containers/Install.js b/client/coral-admin/src/routes/Install/containers/Install.js
index d18f914d7..513950659 100644
--- a/client/coral-admin/src/routes/Install/containers/Install.js
+++ b/client/coral-admin/src/routes/Install/containers/Install.js
@@ -83,4 +83,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
-export default connect(mapStateToProps, mapDispatchToProps)(InstallContainer);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(InstallContainer);
diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.js b/client/coral-admin/src/routes/Moderation/components/Comment.js
index 97cdf9443..b12a1e616 100644
--- a/client/coral-admin/src/routes/Moderation/components/Comment.js
+++ b/client/coral-admin/src/routes/Moderation/components/Comment.js
@@ -170,6 +170,7 @@ class Comment extends React.Component {
className={styles.external}
href={`${comment.asset.url}?commentId=${comment.id}`}
target="_blank"
+ rel="noopener noreferrer"
>
{t('comment.view_context')}
diff --git a/client/coral-admin/src/routes/Moderation/components/StorySearch.js b/client/coral-admin/src/routes/Moderation/components/StorySearch.js
index 011f49d5e..cb233c1e6 100644
--- a/client/coral-admin/src/routes/Moderation/components/StorySearch.js
+++ b/client/coral-admin/src/routes/Moderation/components/StorySearch.js
@@ -5,7 +5,10 @@ import { Button, Spinner, Icon } from 'coral-ui';
import Story from './Story';
const StorySearch = props => {
- const { root: { assets }, data: { loading } } = props;
+ const {
+ root: { assets },
+ data: { loading },
+ } = props;
if (!props.moderation.storySearchVisible) {
return null;
diff --git a/client/coral-admin/src/routes/Moderation/containers/Indicator.js b/client/coral-admin/src/routes/Moderation/containers/Indicator.js
index 93ec2f40f..05bf44f5b 100644
--- a/client/coral-admin/src/routes/Moderation/containers/Indicator.js
+++ b/client/coral-admin/src/routes/Moderation/containers/Indicator.js
@@ -22,7 +22,11 @@ class IndicatorContainer extends Component {
document: COMMENT_ADDED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentAdded: comment } } }
+ {
+ subscriptionData: {
+ data: { commentAdded: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -31,7 +35,11 @@ class IndicatorContainer extends Component {
document: COMMENT_FLAGGED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentFlagged: comment } } }
+ {
+ subscriptionData: {
+ data: { commentFlagged: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -40,7 +48,11 @@ class IndicatorContainer extends Component {
document: COMMENT_EDITED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentEdited: comment } } }
+ {
+ subscriptionData: {
+ data: { commentEdited: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -49,7 +61,11 @@ class IndicatorContainer extends Component {
document: COMMENT_ACCEPTED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentAccepted: comment } } }
+ {
+ subscriptionData: {
+ data: { commentAccepted: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -58,7 +74,11 @@ class IndicatorContainer extends Component {
document: COMMENT_REJECTED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentRejected: comment } } }
+ {
+ subscriptionData: {
+ data: { commentRejected: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -67,7 +87,11 @@ class IndicatorContainer extends Component {
document: COMMENT_RESET_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentReset: comment } } }
+ {
+ subscriptionData: {
+ data: { commentReset: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
diff --git a/client/coral-admin/src/routes/Moderation/containers/Moderation.js b/client/coral-admin/src/routes/Moderation/containers/Moderation.js
index e3f35081c..8bf5ccb79 100644
--- a/client/coral-admin/src/routes/Moderation/containers/Moderation.js
+++ b/client/coral-admin/src/routes/Moderation/containers/Moderation.js
@@ -71,7 +71,9 @@ class ModerationContainer extends Component {
};
get activeTab() {
- const { root: { asset, settings } } = this.props;
+ const {
+ root: { asset, settings },
+ } = this.props;
const id = getAssetId(this.props);
const tab = getTab(this.props);
@@ -94,7 +96,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentAdded: comment } } }
+ {
+ subscriptionData: {
+ data: { commentAdded: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -104,7 +110,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentAccepted: comment } } }
+ {
+ subscriptionData: {
+ data: { commentAccepted: comment },
+ },
+ }
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -125,7 +135,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentRejected: comment } } }
+ {
+ subscriptionData: {
+ data: { commentRejected: comment },
+ },
+ }
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -146,7 +160,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentReset: comment } } }
+ {
+ subscriptionData: {
+ data: { commentReset: comment },
+ },
+ }
) => {
const user =
comment.status_history[comment.status_history.length - 1]
@@ -167,7 +185,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentEdited: comment } } }
+ {
+ subscriptionData: {
+ data: { commentEdited: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -177,7 +199,11 @@ class ModerationContainer extends Component {
variables,
updateQuery: (
prev,
- { subscriptionData: { data: { commentFlagged: comment } } }
+ {
+ subscriptionData: {
+ data: { commentFlagged: comment },
+ },
+ }
) => {
return this.handleCommentChange(prev, comment);
},
@@ -289,7 +315,11 @@ class ModerationContainer extends Component {
};
render() {
- const { root, root: { asset, settings }, data } = this.props;
+ const {
+ root,
+ root: { asset, settings },
+ data,
+ } = this.props;
const assetId = getAssetId(this.props);
if (assetId) {
@@ -546,7 +576,10 @@ const mapDispatchToProps = dispatch => ({
export default compose(
withQueueConfig(baseQueueConfig),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSetCommentStatus,
withModQueueQuery
)(ModerationContainer);
diff --git a/client/coral-admin/src/routes/Moderation/containers/StorySearch.js b/client/coral-admin/src/routes/Moderation/containers/StorySearch.js
index 7f0bd639b..7b538ef6a 100644
--- a/client/coral-admin/src/routes/Moderation/containers/StorySearch.js
+++ b/client/coral-admin/src/routes/Moderation/containers/StorySearch.js
@@ -112,4 +112,7 @@ export const withAssetSearchQuery = withQuery(
}
);
-export default compose(withRouter, withAssetSearchQuery)(StorySearchContainer);
+export default compose(
+ withRouter,
+ withAssetSearchQuery
+)(StorySearchContainer);
diff --git a/client/coral-admin/src/routes/Stories/containers/Stories.js b/client/coral-admin/src/routes/Stories/containers/Stories.js
index 6c54f79d7..144076b41 100644
--- a/client/coral-admin/src/routes/Stories/containers/Stories.js
+++ b/client/coral-admin/src/routes/Stories/containers/Stories.js
@@ -113,4 +113,7 @@ StoriesContainer.propTypes = {
updateAssetState: PropTypes.func.isRequired,
};
-export default connect(mapStateToProps, mapDispatchToProps)(StoriesContainer);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(StoriesContainer);
diff --git a/client/coral-embed-stream/src/containers/Embed.js b/client/coral-embed-stream/src/containers/Embed.js
index d365af50d..836def259 100644
--- a/client/coral-embed-stream/src/containers/Embed.js
+++ b/client/coral-embed-stream/src/containers/Embed.js
@@ -41,7 +41,13 @@ class EmbedContainer extends React.Component {
document: USER_BANNED_SUBSCRIPTION,
updateQuery: (
_,
- { subscriptionData: { data: { userBanned: { state } } } }
+ {
+ subscriptionData: {
+ data: {
+ userBanned: { state },
+ },
+ },
+ }
) => {
notify('info', t('your_account_has_been_banned'));
props.updateStatus(state.status);
@@ -51,7 +57,13 @@ class EmbedContainer extends React.Component {
document: USER_SUSPENDED_SUBSCRIPTION,
updateQuery: (
_,
- { subscriptionData: { data: { userSuspended: { state } } } }
+ {
+ subscriptionData: {
+ data: {
+ userSuspended: { state },
+ },
+ },
+ }
) => {
notify('info', t('your_account_has_been_suspended'));
props.updateStatus(state.status);
@@ -61,7 +73,13 @@ class EmbedContainer extends React.Component {
document: USERNAME_REJECTED_SUBSCRIPTION,
updateQuery: (
_,
- { subscriptionData: { data: { usernameRejected: { state } } } }
+ {
+ subscriptionData: {
+ data: {
+ usernameRejected: { state },
+ },
+ },
+ }
) => {
notify('info', t('your_username_has_been_rejected'));
props.updateStatus(state.status);
@@ -324,7 +342,10 @@ const mapDispatchToProps = dispatch =>
export default compose(
withPopupAuthHandler,
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
branch(props => !props.checkedInitialLogin, renderComponent(Spinner)),
withEmbedQuery
)(EmbedContainer);
diff --git a/client/coral-embed-stream/src/graphql/index.js b/client/coral-embed-stream/src/graphql/index.js
index d9f6b4f64..e9f0b094b 100644
--- a/client/coral-embed-stream/src/graphql/index.js
+++ b/client/coral-embed-stream/src/graphql/index.js
@@ -126,7 +126,9 @@ export default {
},
mutations: {
PostComment: ({
- variables: { input: { asset_id, body, parent_id, tags = [] } },
+ variables: {
+ input: { asset_id, body, parent_id, tags = [] },
+ },
state: { auth },
}) => ({
optimisticResponse: {
@@ -193,7 +195,13 @@ export default {
updateQueries: {
CoralEmbedStream_Embed: (
prev,
- { mutationResult: { data: { createComment: { comment } } } }
+ {
+ mutationResult: {
+ data: {
+ createComment: { comment },
+ },
+ },
+ }
) => {
if (
(![ADMIN, MODERATOR].includes(prev.me.role) &&
@@ -208,7 +216,13 @@ export default {
},
CoralEmbedStream_Profile: (
prev,
- { mutationResult: { data: { createComment: { comment } } } }
+ {
+ mutationResult: {
+ data: {
+ createComment: { comment },
+ },
+ },
+ }
) => {
return update(prev, {
me: {
@@ -224,7 +238,13 @@ export default {
updateQueries: {
CoralEmbedStream_Embed: (
prev,
- { mutationResult: { data: { editComment: { comment } } } }
+ {
+ mutationResult: {
+ data: {
+ editComment: { comment },
+ },
+ },
+ }
) => {
if (
!['PREMOD', 'REJECTED', 'SYSTEM_WITHHELD'].includes(comment.status)
diff --git a/client/coral-embed-stream/src/tabs/configure/containers/Settings.js b/client/coral-embed-stream/src/tabs/configure/containers/Settings.js
index cfb72c0ae..86e8d30b3 100644
--- a/client/coral-embed-stream/src/tabs/configure/containers/Settings.js
+++ b/client/coral-embed-stream/src/tabs/configure/containers/Settings.js
@@ -139,7 +139,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSettingsFragments,
withUpdateAssetSettings,
withMergedSettings('asset.settings', 'pending', 'mergedSettings')
diff --git a/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js b/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js
index 27727216e..46b188c12 100644
--- a/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js
+++ b/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js
@@ -22,7 +22,14 @@ class CommentHistoryContainer extends Component {
limit: 5,
cursor: this.props.root.me.comments.endCursor,
},
- updateQuery: (previous, { fetchMoreResult: { me: { comments } } }) => {
+ updateQuery: (
+ previous,
+ {
+ fetchMoreResult: {
+ me: { comments },
+ },
+ }
+ ) => {
const updated = update(previous, {
me: {
comments: {
@@ -97,7 +104,10 @@ const mapStateToProps = state => ({
});
export default compose(
- connect(mapStateToProps, null),
+ connect(
+ mapStateToProps,
+ null
+ ),
withCommentHistoryFragments,
withFetchMore
)(CommentHistoryContainer);
diff --git a/client/coral-embed-stream/src/tabs/profile/containers/Profile.js b/client/coral-embed-stream/src/tabs/profile/containers/Profile.js
index 4a84f1810..6c73e0eff 100644
--- a/client/coral-embed-stream/src/tabs/profile/containers/Profile.js
+++ b/client/coral-embed-stream/src/tabs/profile/containers/Profile.js
@@ -80,6 +80,7 @@ const mapStateToProps = state => ({
currentUser: state.auth.user,
});
-export default compose(connect(mapStateToProps), withProfileQuery)(
- ProfileContainer
-);
+export default compose(
+ connect(mapStateToProps),
+ withProfileQuery
+)(ProfileContainer);
diff --git a/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js b/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js
index 46c24227f..4bbe959f7 100644
--- a/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js
+++ b/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js
@@ -55,7 +55,10 @@ export default compose(
${Settings.fragments.root}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSlotElements({
slot: 'profileSettings',
propName: 'profileSettingsSlotElements',
diff --git a/client/coral-embed-stream/src/tabs/stream/components/Comment.js b/client/coral-embed-stream/src/tabs/stream/components/Comment.js
index 63740764f..e5aea7589 100644
--- a/client/coral-embed-stream/src/tabs/stream/components/Comment.js
+++ b/client/coral-embed-stream/src/tabs/stream/components/Comment.js
@@ -117,8 +117,12 @@ export default class Comment extends React.Component {
}
componentWillReceiveProps(next) {
- const { comment: { replies: prevReplies } } = this.props;
- const { comment: { replies: nextReplies } } = next;
+ const {
+ comment: { replies: prevReplies },
+ } = this.props;
+ const {
+ comment: { replies: nextReplies },
+ } = next;
if (
prevReplies &&
nextReplies &&
@@ -243,7 +247,10 @@ export default class Comment extends React.Component {
}
loadNewReplies = () => {
- const { comment: { replies, replyCount, id }, emit } = this.props;
+ const {
+ comment: { replies, replyCount, id },
+ emit,
+ } = this.props;
if (replyCount > replies.nodes.length) {
this.setState({ loadingState: 'loading' });
this.props
@@ -292,7 +299,11 @@ export default class Comment extends React.Component {
// getVisibileReplies returns a list containing comments
// which were authored by current user or comes before the `idCursor`.
getVisibileReplies() {
- const { comment: { replies }, currentUser, liveUpdates } = this.props;
+ const {
+ comment: { replies },
+ currentUser,
+ liveUpdates,
+ } = this.props;
const idCursor = this.state.idCursors[0];
const userId = currentUser ? currentUser.id : null;
diff --git a/client/coral-embed-stream/src/tabs/stream/components/ModerationLink.js b/client/coral-embed-stream/src/tabs/stream/components/ModerationLink.js
index d33f18a5e..73ec2935e 100644
--- a/client/coral-embed-stream/src/tabs/stream/components/ModerationLink.js
+++ b/client/coral-embed-stream/src/tabs/stream/components/ModerationLink.js
@@ -18,6 +18,7 @@ const ModerationLink = props =>
className="talk-embed-stream-moderation-link"
href={`${BASE_PATH}admin/moderate/${props.assetId}`}
target="_blank"
+ rel="noopener noreferrer"
>
{t('moderate_this_stream')}
diff --git a/client/coral-embed-stream/src/tabs/stream/components/Stream.js b/client/coral-embed-stream/src/tabs/stream/components/Stream.js
index 4ecb0a8bd..b097f3d57 100644
--- a/client/coral-embed-stream/src/tabs/stream/components/Stream.js
+++ b/client/coral-embed-stream/src/tabs/stream/components/Stream.js
@@ -211,7 +211,10 @@ class Stream extends React.Component {
root,
appendItemArray,
asset,
- asset: { comment: highlightedComment, settings: { questionBoxEnable } },
+ asset: {
+ comment: highlightedComment,
+ settings: { questionBoxEnable },
+ },
postComment,
notify,
updateItem,
diff --git a/client/coral-embed-stream/src/tabs/stream/containers/CommentBox.js b/client/coral-embed-stream/src/tabs/stream/containers/CommentBox.js
index 57b5a2f17..d77b72992 100644
--- a/client/coral-embed-stream/src/tabs/stream/containers/CommentBox.js
+++ b/client/coral-embed-stream/src/tabs/stream/containers/CommentBox.js
@@ -215,7 +215,10 @@ const mapStateToProps = state => ({
const enhance = compose(
withHooks(['preSubmit', 'postSubmit']),
- connect(mapStateToProps, null)
+ connect(
+ mapStateToProps,
+ null
+ )
);
export default enhance(CommentBox);
diff --git a/client/coral-embed-stream/src/tabs/stream/containers/CommentNotFound.js b/client/coral-embed-stream/src/tabs/stream/containers/CommentNotFound.js
index 91537aac4..963cfff0f 100644
--- a/client/coral-embed-stream/src/tabs/stream/containers/CommentNotFound.js
+++ b/client/coral-embed-stream/src/tabs/stream/containers/CommentNotFound.js
@@ -33,4 +33,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
-export default connect(null, mapDispatchToProps)(CommentNotFound);
+export default connect(
+ null,
+ mapDispatchToProps
+)(CommentNotFound);
diff --git a/client/coral-embed-stream/src/tabs/stream/containers/Stream.js b/client/coral-embed-stream/src/tabs/stream/containers/Stream.js
index d6ca27558..1f32fcedf 100644
--- a/client/coral-embed-stream/src/tabs/stream/containers/Stream.js
+++ b/client/coral-embed-stream/src/tabs/stream/containers/Stream.js
@@ -54,7 +54,11 @@ class StreamContainer extends React.Component {
},
updateQuery: (
prev,
- { subscriptionData: { data: { commentEdited } } }
+ {
+ subscriptionData: {
+ data: { commentEdited },
+ },
+ }
) => {
// Ignore mutations from me.
// TODO: need way to detect mutations created by this client, and allow mutations from other clients.
@@ -87,7 +91,14 @@ class StreamContainer extends React.Component {
variables: {
assetId: this.props.asset.id,
},
- updateQuery: (prev, { subscriptionData: { data: { commentAdded } } }) => {
+ updateQuery: (
+ prev,
+ {
+ subscriptionData: {
+ data: { commentAdded },
+ },
+ }
+ ) => {
// Ignore mutations from me.
// TODO: need way to detect mutations created by this client, and allow mutations from other clients.
if (
@@ -488,7 +499,10 @@ const mapDispatchToProps = dispatch =>
export default compose(
withFragments(fragments),
withEmit,
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withPostComment,
// `talk-plugin-flags` has a custom error handling logic.
withPostFlag({ notifyOnError: false }),
diff --git a/client/coral-framework/components/AdminCommentContent.js b/client/coral-framework/components/AdminCommentContent.js
index b3110e822..2cbedb338 100644
--- a/client/coral-framework/components/AdminCommentContent.js
+++ b/client/coral-framework/components/AdminCommentContent.js
@@ -78,7 +78,12 @@ function markLinks(body, keyPrefix) {
matches.forEach((match, i) => {
content.push(body.substring(index, match.index));
content.push(
-
+
{match.text}
);
diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js
index 048c4da80..75844d8ca 100644
--- a/client/coral-framework/components/Slot.js
+++ b/client/coral-framework/components/Slot.js
@@ -103,5 +103,8 @@ export default compose(
size: props => props.size,
defaultComponent: props => props.defaultComponent,
}),
- connect(mapStateToProps, null)
+ connect(
+ mapStateToProps,
+ null
+ )
)(Slot);
diff --git a/client/coral-framework/hocs/connect.js b/client/coral-framework/hocs/connect.js
index 735527fd2..2e78361eb 100644
--- a/client/coral-framework/hocs/connect.js
+++ b/client/coral-framework/hocs/connect.js
@@ -2,5 +2,8 @@ import { connect } from 'react-redux';
export default (mapStateToProps, ...rest) => BaseComponent => {
BaseComponent.mapStateToProps = mapStateToProps;
- return connect(mapStateToProps, ...rest)(BaseComponent);
+ return connect(
+ mapStateToProps,
+ ...rest
+ )(BaseComponent);
};
diff --git a/client/coral-framework/hocs/withSetUsername.js b/client/coral-framework/hocs/withSetUsername.js
index 3a8f65a22..f9290ef99 100644
--- a/client/coral-framework/hocs/withSetUsername.js
+++ b/client/coral-framework/hocs/withSetUsername.js
@@ -95,7 +95,10 @@ const mapDispatchToProps = dispatch =>
bindActionCreators({ updateUsername, updateStatus }, dispatch);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSetUsernameMutation,
withSetUsername
);
diff --git a/client/coral-framework/hocs/withSignUp.js b/client/coral-framework/hocs/withSignUp.js
index 8c35e1cc9..c2007df9a 100644
--- a/client/coral-framework/hocs/withSignUp.js
+++ b/client/coral-framework/hocs/withSignUp.js
@@ -121,4 +121,7 @@ const withSignUp = hoistStatics(WrappedComponent => {
return WithSignUp;
});
-export default compose(withSettingsQuery, withSignUp);
+export default compose(
+ withSettingsQuery,
+ withSignUp
+);
diff --git a/client/coral-framework/hocs/withSlotElements.js b/client/coral-framework/hocs/withSlotElements.js
index 9b432ade8..0373a2571 100644
--- a/client/coral-framework/hocs/withSlotElements.js
+++ b/client/coral-framework/hocs/withSlotElements.js
@@ -198,5 +198,11 @@ const mapStateToProps = state => ({
* })(MyComponent);
*/
export default settings => {
- return compose(connect(mapStateToProps, null), createHOC(settings));
+ return compose(
+ connect(
+ mapStateToProps,
+ null
+ ),
+ createHOC(settings)
+ );
};
diff --git a/client/coral-framework/services/events.js b/client/coral-framework/services/events.js
index e0d1b1354..e1a1577a1 100644
--- a/client/coral-framework/services/events.js
+++ b/client/coral-framework/services/events.js
@@ -9,7 +9,11 @@ export function createReduxEmitter(eventEmitter) {
// Handle apollo actions.
if (action.type.startsWith('APOLLO_')) {
if (action.type === 'APOLLO_SUBSCRIPTION_RESULT') {
- const { operationName, variables, result: { data } } = action;
+ const {
+ operationName,
+ variables,
+ result: { data },
+ } = action;
eventEmitter.emit(`subscription.${operationName}.data`, {
variables,
data,
diff --git a/config.js b/config.js
index b547636f4..8987f1114 100644
--- a/config.js
+++ b/config.js
@@ -64,7 +64,9 @@ const CONFIG = {
process.env.TALK_LOGGING_LEVEL
)
? process.env.TALK_LOGGING_LEVEL
- : process.env.NODE_ENV === 'test' ? 'fatal' : 'info',
+ : process.env.NODE_ENV === 'test'
+ ? 'fatal'
+ : 'info',
// REVISION_HASH when using the docker build will contain the build hash that
// it was built at.
diff --git a/graph/context.js b/graph/context.js
index 9c356f0e7..ea694f6cf 100644
--- a/graph/context.js
+++ b/graph/context.js
@@ -149,7 +149,9 @@ class Context {
* operations.
*/
static forSystem() {
- const { models: { User } } = connectors;
+ const {
+ models: { User },
+ } = connectors;
// Create the system user.
const user = new User({ system: true });
diff --git a/graph/errorHandler.js b/graph/errorHandler.js
index 9e8d98f74..8dfd10ec3 100644
--- a/graph/errorHandler.js
+++ b/graph/errorHandler.js
@@ -1,7 +1,9 @@
const { forEachField } = require('./utils');
const { maskErrors } = require('graphql-errors');
const { TalkError } = require('../errors');
-const { Error: { ValidationError } } = require('mongoose');
+const {
+ Error: { ValidationError },
+} = require('mongoose');
// If an APIError happens in a mutation, then respond with `{errors: Array}`
// according to the schema.
diff --git a/graph/loaders/actions.js b/graph/loaders/actions.js
index 77cc7138d..6ef29cb66 100644
--- a/graph/loaders/actions.js
+++ b/graph/loaders/actions.js
@@ -6,7 +6,11 @@ const { first, get, merge, remove, groupBy, reduce, isNil } = require('lodash');
* Gets actions based on their item id's.
*/
const genActionsByItemID = (
- { connectors: { services: { Actions } } },
+ {
+ connectors: {
+ services: { Actions },
+ },
+ },
item_ids
) => {
return Actions.findByItemIdArray(item_ids).then(
@@ -21,7 +25,12 @@ const genActionsByItemID = (
* @param {Array} itemIDs the items that we need to get the actions for
*/
const genActionsAuthoredWithID = (
- { user = {}, connectors: { services: { Actions } } },
+ {
+ user = {},
+ connectors: {
+ services: { Actions },
+ },
+ },
itemIDs
) =>
Actions.getUserActions(user.id, itemIDs).then(
@@ -50,7 +59,9 @@ const iterateActionCounts = action_counts =>
* @param {Object} item the item that we're getting the actions for
*/
async function getUserActions(ctx, { action_counts, id }) {
- const { loaders: { Actions } } = ctx;
+ const {
+ loaders: { Actions },
+ } = ctx;
// Get the total count for all action types.
const totalActionCount = reduce(
diff --git a/graph/loaders/assets.js b/graph/loaders/assets.js
index 868c8af68..0d55b6b13 100644
--- a/graph/loaders/assets.js
+++ b/graph/loaders/assets.js
@@ -2,7 +2,14 @@ const DataLoader = require('dataloader');
const { URL } = require('url');
const { singleJoinBy, SingletonResolver } = require('./util');
-const genAssetsByID = ({ connectors: { models: { Asset } } }, ids) =>
+const genAssetsByID = (
+ {
+ connectors: {
+ models: { Asset },
+ },
+ },
+ ids
+) =>
Asset.find({
id: {
$in: ids,
@@ -10,7 +17,11 @@ const genAssetsByID = ({ connectors: { models: { Asset } } }, ids) =>
}).then(singleJoinBy(ids, 'id'));
const getAssetsByQuery = async (
- { connectors: { services: { Assets } } },
+ {
+ connectors: {
+ services: { Assets },
+ },
+ },
query
) => {
// If we are requesting based on a limit, ask for one more than we want.
@@ -126,7 +137,12 @@ const findOrCreateAssetByURL = async (ctx, url) => {
};
const findByUrl = async (
- { connectors: { errors, services: { Assets } } },
+ {
+ connectors: {
+ errors,
+ services: { Assets },
+ },
+ },
asset_url
) => {
// Try to validate that the url is valid. If the URL constructor throws an
diff --git a/graph/loaders/users.js b/graph/loaders/users.js
index 2c1e9fbac..1a886bd25 100644
--- a/graph/loaders/users.js
+++ b/graph/loaders/users.js
@@ -51,7 +51,11 @@ const genUserByIDs = async (ctx, ids) => {
return [];
}
- const { connectors: { models: { User } } } = ctx;
+ const {
+ connectors: {
+ models: { User },
+ },
+ } = ctx;
return User.find({ id: { $in: ids } }).then(util.singleJoinBy(ids, 'id'));
};
@@ -63,7 +67,12 @@ const genUserByIDs = async (ctx, ids) => {
* @param {Object} query query terms to apply to the users query
*/
const getUsersByQuery = async (
- { user, connectors: { models: { User } } },
+ {
+ user,
+ connectors: {
+ models: { User },
+ },
+ },
{ limit, cursor, value = '', state, action_type, sortOrder }
) => {
let query = User.find();
@@ -175,7 +184,12 @@ const getUsersByQuery = async (
* query
*/
const getCountByQuery = async (
- { user, connectors: { models: { User } } },
+ {
+ user,
+ connectors: {
+ models: { User },
+ },
+ },
{ action_type, state }
) => {
const query = User.find();
diff --git a/graph/mutators/action.js b/graph/mutators/action.js
index 5557e1a9b..62097d0cd 100644
--- a/graph/mutators/action.js
+++ b/graph/mutators/action.js
@@ -11,7 +11,9 @@ const { IGNORE_FLAGS_AGAINST_STAFF } = require('../../config');
* @return {Promise} resolves to the referenced item
*/
const getActionItem = async (ctx, { item_id, item_type }) => {
- const { loaders: { Comments, Users } } = ctx;
+ const {
+ loaders: { Comments, Users },
+ } = ctx;
switch (item_type) {
case 'COMMENTS': {
@@ -42,7 +44,13 @@ const createAction = async (
ctx,
{ item_id, item_type, action_type, group_id, metadata = {} }
) => {
- const { user = {}, pubsub, connectors: { services: { Actions } } } = ctx;
+ const {
+ user = {},
+ pubsub,
+ connectors: {
+ services: { Actions },
+ },
+ } = ctx;
// Gets the item referenced by the action.
const item = await getActionItem(ctx, { item_id, item_type });
@@ -107,7 +115,12 @@ const createAction = async (
* @return {Promise} resolves to the deleted action, or null if not found.
*/
const deleteAction = (ctx, { id }) => {
- const { user, connectors: { services: { Actions } } } = ctx;
+ const {
+ user,
+ connectors: {
+ services: { Actions },
+ },
+ } = ctx;
return Actions.delete({ id, user_id: user.id });
};
diff --git a/graph/mutators/asset.js b/graph/mutators/asset.js
index d5b72102d..d87de133e 100644
--- a/graph/mutators/asset.js
+++ b/graph/mutators/asset.js
@@ -63,7 +63,11 @@ const closeNow = async (ctx, id) =>
* @param {String} id the asset's id to scrape
*/
const scrapeAsset = async (ctx, id) => {
- const { connectors: { services: { Scraper } } } = ctx;
+ const {
+ connectors: {
+ services: { Scraper },
+ },
+ } = ctx;
return Scraper.create(ctx, id);
};
diff --git a/graph/mutators/comment.js b/graph/mutators/comment.js
index b57aedeb3..c815dc51e 100644
--- a/graph/mutators/comment.js
+++ b/graph/mutators/comment.js
@@ -14,7 +14,10 @@ const {
} = require('../../perms/constants');
const resolveTagsForComment = async (ctx, { asset_id, tags = [] }) => {
- const { user, loaders: { Tags } } = ctx;
+ const {
+ user,
+ loaders: { Tags },
+ } = ctx;
const item_type = 'COMMENTS';
// Handle Tags
@@ -156,7 +159,11 @@ const createComment = async (
metadata = {},
}
) => {
- const { user, loaders: { Comments }, pubsub } = ctx;
+ const {
+ user,
+ loaders: { Comments },
+ pubsub,
+ } = ctx;
// Resolve the tags for the comment.
tags = await resolveTagsForComment(ctx, { asset_id, tags });
@@ -202,7 +209,11 @@ const createComment = async (
* @return {Promise} resolves to a new comment
*/
const createPublicComment = async (ctx, comment) => {
- const { connectors: { services: { Moderation } } } = ctx;
+ const {
+ connectors: {
+ services: { Moderation },
+ },
+ } = ctx;
// We then take the wordlist and the comment into consideration when
// considering what status to assign the new comment, and resolve the new
@@ -245,7 +256,10 @@ const createActions = async (item_id, actions = []) =>
* @param {String} status the new status of the comment
*/
const setStatus = async (ctx, { id, status }) => {
- const { user, loaders: { Comments } } = ctx;
+ const {
+ user,
+ loaders: { Comments },
+ } = ctx;
let comment = await CommentsService.pushStatus(
id,
@@ -281,7 +295,11 @@ const editComment = async (
ctx,
{ id, asset_id, edit: { body, metadata = {} } }
) => {
- const { connectors: { services: { Moderation } } } = ctx;
+ const {
+ connectors: {
+ services: { Moderation },
+ },
+ } = ctx;
// Build up the new comment we're setting. We need to check this with
// moderation now.
diff --git a/graph/mutators/user.js b/graph/mutators/user.js
index 7422f2290..fa6a18ee5 100644
--- a/graph/mutators/user.js
+++ b/graph/mutators/user.js
@@ -92,7 +92,11 @@ const actionDecrTransformer = ({ item_id, action_type, group_id }) => {
// delUser will delete a given user with the specified id.
const delUser = async (ctx, id) => {
- const { connectors: { models: { User, Action, Comment } } } = ctx;
+ const {
+ connectors: {
+ models: { User, Action, Comment },
+ },
+ } = ctx;
// Find the user we're removing.
const user = await User.findOne({ id });
@@ -178,7 +182,9 @@ const changeUserPassword = async (ctx, oldPassword, newPassword) => {
const {
user,
loaders: { Settings },
- connectors: { services: { I18n } },
+ connectors: {
+ services: { I18n },
+ },
} = ctx;
// Verify the old password.
diff --git a/graph/resolvers/asset.js b/graph/resolvers/asset.js
index 3ed5305b7..13a950464 100644
--- a/graph/resolvers/asset.js
+++ b/graph/resolvers/asset.js
@@ -1,7 +1,13 @@
const { decorateWithTags, getRequestedFields } = require('./util');
const Asset = {
- async comment({ id }, { id: commentId }, { loaders: { Comments } }) {
+ async comment(
+ { id },
+ { id: commentId },
+ {
+ loaders: { Comments },
+ }
+ ) {
// Load the comment from the database.
const comment = await Comments.get.load(commentId);
if (!comment) {
@@ -15,7 +21,13 @@ const Asset = {
return comment;
},
- comments({ id }, { query, deep }, { loaders: { Comments } }) {
+ comments(
+ { id },
+ { query, deep },
+ {
+ loaders: { Comments },
+ }
+ ) {
if (!deep) {
query.parent_id = null;
}
@@ -25,7 +37,13 @@ const Asset = {
return Comments.getByQuery(query);
},
- commentCount({ id, commentCount }, { tags }, { loaders: { Comments } }) {
+ commentCount(
+ { id, commentCount },
+ { tags },
+ {
+ loaders: { Comments },
+ }
+ ) {
if (commentCount != null) {
return commentCount;
}
@@ -46,7 +64,9 @@ const Asset = {
totalCommentCount(
{ id, totalCommentCount },
{ tags },
- { loaders: { Comments } }
+ {
+ loaders: { Comments },
+ }
) {
if (totalCommentCount != null) {
return totalCommentCount;
@@ -64,7 +84,14 @@ const Asset = {
return Comments.countByAssetID.load(id);
},
- async settings({ settings = null }, _, { loaders: { Settings } }, info) {
+ async settings(
+ { settings = null },
+ _,
+ {
+ loaders: { Settings },
+ },
+ info
+ ) {
// Get the fields we want from the settings.
const fields = getRequestedFields(info);
diff --git a/graph/resolvers/comment.js b/graph/resolvers/comment.js
index acd55cb1a..09d930639 100644
--- a/graph/resolvers/comment.js
+++ b/graph/resolvers/comment.js
@@ -16,19 +16,37 @@ const Comment = {
hasParent({ parent_id }) {
return !!parent_id;
},
- parent({ parent_id }, _, { loaders: { Comments } }) {
+ parent(
+ { parent_id },
+ _,
+ {
+ loaders: { Comments },
+ }
+ ) {
if (parent_id == null) {
return null;
}
return Comments.get.load(parent_id);
},
- user({ author_id }, _, { loaders: { Users } }) {
+ user(
+ { author_id },
+ _,
+ {
+ loaders: { Users },
+ }
+ ) {
if (author_id) {
return Users.getByID.load(author_id);
}
},
- replies({ id, asset_id, reply_count }, { query }, { loaders: { Comments } }) {
+ replies(
+ { id, asset_id, reply_count },
+ { query },
+ {
+ loaders: { Comments },
+ }
+ ) {
// Don't bother looking up replies if there aren't any there!
if (reply_count === 0) {
return {
@@ -44,17 +62,35 @@ const Comment = {
return Comments.getByQuery(query);
},
replyCount: property('reply_count'),
- actions({ id }, _, { loaders: { Actions } }) {
+ actions(
+ { id },
+ _,
+ {
+ loaders: { Actions },
+ }
+ ) {
return Actions.getByID.load(id);
},
- action_summaries(comment, _, { loaders: { Actions } }) {
+ action_summaries(
+ comment,
+ _,
+ {
+ loaders: { Actions },
+ }
+ ) {
if (comment.action_summaries) {
return comment.action_summaries;
}
return Actions.getSummariesByItem.load(comment);
},
- asset({ asset_id }, _, { loaders: { Assets } }) {
+ asset(
+ { asset_id },
+ _,
+ {
+ loaders: { Assets },
+ }
+ ) {
return Assets.getByID.load(asset_id);
},
editing: async (comment, _, { loaders: { Settings } }) => {
@@ -71,7 +107,13 @@ const Comment = {
editableUntil: editableUntil,
};
},
- async url(comment, args, { loaders: { Assets } }) {
+ async url(
+ comment,
+ args,
+ {
+ loaders: { Assets },
+ }
+ ) {
const asset = await Assets.getByID.load(comment.asset_id);
if (!asset) {
return null;
diff --git a/graph/resolvers/root_query.js b/graph/resolvers/root_query.js
index 53296a2ca..e9e43f915 100644
--- a/graph/resolvers/root_query.js
+++ b/graph/resolvers/root_query.js
@@ -6,17 +6,36 @@ const {
} = require('../../perms/constants');
const RootQuery = {
- assets(_, { query }, { loaders: { Assets } }) {
+ assets(
+ _,
+ { query },
+ {
+ loaders: { Assets },
+ }
+ ) {
return Assets.getByQuery(query);
},
- asset(_, query, { loaders: { Assets } }) {
+ asset(
+ _,
+ query,
+ {
+ loaders: { Assets },
+ }
+ ) {
if (query.id) {
return Assets.getByID.load(query.id);
}
return Assets.getByURL(query.url);
},
- settings(_, args, { loaders: { Settings } }, info) {
+ settings(
+ _,
+ args,
+ {
+ loaders: { Settings },
+ },
+ info
+ ) {
// Get the fields we want from the settings.
const fields = getRequestedFields(info);
@@ -26,15 +45,33 @@ const RootQuery = {
// This endpoint is used for loading moderation queues, so hide it in the
// event that we aren't an admin.
- async comments(_, { query }, { loaders: { Comments } }) {
+ async comments(
+ _,
+ { query },
+ {
+ loaders: { Comments },
+ }
+ ) {
return Comments.getByQuery(query);
},
- comment(_, { id }, { loaders: { Comments } }) {
+ comment(
+ _,
+ { id },
+ {
+ loaders: { Comments },
+ }
+ ) {
return Comments.get.load(id);
},
- async commentCount(_, { query }, { loaders: { Comments, Assets } }) {
+ async commentCount(
+ _,
+ { query },
+ {
+ loaders: { Comments, Assets },
+ }
+ ) {
const { asset_url, asset_id } = query;
if (
(!asset_id || asset_id.length === 0) &&
@@ -50,7 +87,13 @@ const RootQuery = {
return Comments.getCountByQuery(query);
},
- async userCount(_, { query }, { loaders: { Users } }) {
+ async userCount(
+ _,
+ { query },
+ {
+ loaders: { Users },
+ }
+ ) {
return Users.getCountByQuery(query);
},
@@ -65,13 +108,25 @@ const RootQuery = {
},
// this returns an arbitrary user
- user(_, { id }, { loaders: { Users } }) {
+ user(
+ _,
+ { id },
+ {
+ loaders: { Users },
+ }
+ ) {
return Users.getByID.load(id);
},
// This endpoint is used for loading the user moderation queues (users whose username has been flagged),
// so hide it in the event that we aren't an admin.
- users(_, { query }, { loaders: { Users } }) {
+ users(
+ _,
+ { query },
+ {
+ loaders: { Users },
+ }
+ ) {
return Users.getByQuery(query);
},
};
diff --git a/graph/resolvers/settings.js b/graph/resolvers/settings.js
index a299530f2..4676d9eea 100644
--- a/graph/resolvers/settings.js
+++ b/graph/resolvers/settings.js
@@ -5,7 +5,13 @@ const Settings = {
karmaThresholds: (
settings,
args,
- { connectors: { services: { Karma: { THRESHOLDS } } } }
+ {
+ connectors: {
+ services: {
+ Karma: { THRESHOLDS },
+ },
+ },
+ }
) => THRESHOLDS,
};
diff --git a/graph/resolvers/user.js b/graph/resolvers/user.js
index 67478785a..70e10bc4c 100644
--- a/graph/resolvers/user.js
+++ b/graph/resolvers/user.js
@@ -16,20 +16,44 @@ const {
const { property } = require('lodash');
const User = {
- action_summaries(user, _, { loaders: { Actions } }) {
+ action_summaries(
+ user,
+ _,
+ {
+ loaders: { Actions },
+ }
+ ) {
return Actions.getSummariesByItem.load(user);
},
- actions({ id }, _, { loaders: { Actions } }) {
+ actions(
+ { id },
+ _,
+ {
+ loaders: { Actions },
+ }
+ ) {
return Actions.getByID.load(id);
},
- comments({ id }, { query }, { loaders: { Comments } }) {
+ comments(
+ { id },
+ { query },
+ {
+ loaders: { Comments },
+ }
+ ) {
// Set the author id on the query.
query.author_id = id;
return Comments.getByQuery(query);
},
- ignoredUsers({ ignoresUsers }, args, { loaders: { Users } }) {
+ ignoredUsers(
+ { ignoresUsers },
+ args,
+ {
+ loaders: { Users },
+ }
+ ) {
// Return nothing if there is nothing to query for.
if (!ignoresUsers || ignoresUsers.length <= 0) {
return [];
diff --git a/plugin-api/beta/client/hocs/withReaction.js b/plugin-api/beta/client/hocs/withReaction.js
index 95d3f5bcf..7181d36ec 100644
--- a/plugin-api/beta/client/hocs/withReaction.js
+++ b/plugin-api/beta/client/hocs/withReaction.js
@@ -413,7 +413,9 @@ export default (reaction, options = {}) =>
update: (
proxy,
{
- data: { [`create${Reaction}Action`]: { [reaction]: action } },
+ data: {
+ [`create${Reaction}Action`]: { [reaction]: action },
+ },
}
) => {
const a = {
@@ -466,7 +468,10 @@ export default (reaction, options = {}) =>
${fragments.comment ? fragments.comment : ''}
`,
}),
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withDeleteReaction,
withPostReaction
);
diff --git a/plugin-api/beta/client/hocs/withSortOption.js b/plugin-api/beta/client/hocs/withSortOption.js
index b9d556c32..f7c2bb842 100644
--- a/plugin-api/beta/client/hocs/withSortOption.js
+++ b/plugin-api/beta/client/hocs/withSortOption.js
@@ -52,5 +52,8 @@ export default ({ sortBy = 'created_at', sortOrder = 'DESC', label }) =>
);
}
}
- return connect(mapStateToProps, mapDispatchToProps)(WithSortOption);
+ return connect(
+ mapStateToProps,
+ mapDispatchToProps
+ )(WithSortOption);
});
diff --git a/plugin-api/beta/client/hocs/withTags.js b/plugin-api/beta/client/hocs/withTags.js
index 958028a4b..92d417ee3 100644
--- a/plugin-api/beta/client/hocs/withTags.js
+++ b/plugin-api/beta/client/hocs/withTags.js
@@ -139,7 +139,10 @@ export default (tag, options = {}) =>
}),
withAddTag,
withRemoveTag,
- connect(mapStateToProps, null)
+ connect(
+ mapStateToProps,
+ null
+ )
);
WithTags.displayName = `WithTags(${getDisplayName(WrappedComponent)})`;
diff --git a/plugin-api/beta/server/getReactionConfig.js b/plugin-api/beta/server/getReactionConfig.js
index f1f25b261..91db0462b 100644
--- a/plugin-api/beta/server/getReactionConfig.js
+++ b/plugin-api/beta/server/getReactionConfig.js
@@ -180,7 +180,14 @@ function getReactionConfig(reaction) {
[`${Reaction}Action`]: {
// This will load the user for the specific action. We'll limit this to the
// admin users only or the current logged in user.
- user({ user_id }, _, { loaders: { Users }, user }) {
+ user(
+ { user_id },
+ _,
+ {
+ loaders: { Users },
+ user,
+ }
+ ) {
if (user && (user.can(SEARCH_OTHER_USERS) || user_id === user.id)) {
return Users.getByID.load(user_id);
}
diff --git a/plugins/talk-plugin-akismet/client/containers/CheckSpamHook.js b/plugins/talk-plugin-akismet/client/containers/CheckSpamHook.js
index f580b9632..05036eed9 100644
--- a/plugins/talk-plugin-akismet/client/containers/CheckSpamHook.js
+++ b/plugins/talk-plugin-akismet/client/containers/CheckSpamHook.js
@@ -5,4 +5,7 @@ import CheckSpamHook from '../components/CheckSpamHook';
const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch);
-export default connect(null, mapDispatchToProps)(CheckSpamHook);
+export default connect(
+ null,
+ mapDispatchToProps
+)(CheckSpamHook);
diff --git a/plugins/talk-plugin-auth/client/login/containers/ForgotPassword.js b/plugins/talk-plugin-auth/client/login/containers/ForgotPassword.js
index c5e2f42da..411ef1869 100644
--- a/plugins/talk-plugin-auth/client/login/containers/ForgotPassword.js
+++ b/plugins/talk-plugin-auth/client/login/containers/ForgotPassword.js
@@ -58,6 +58,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withForgotPassword
)(ForgotPasswordContainer);
diff --git a/plugins/talk-plugin-auth/client/login/containers/Main.js b/plugins/talk-plugin-auth/client/login/containers/Main.js
index 235bd6cde..7aaa3b759 100644
--- a/plugins/talk-plugin-auth/client/login/containers/Main.js
+++ b/plugins/talk-plugin-auth/client/login/containers/Main.js
@@ -50,4 +50,7 @@ const mapDispatchToProps = dispatch =>
dispatch
);
-export default connect(mapStateToProps, mapDispatchToProps)(MainContainer);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(MainContainer);
diff --git a/plugins/talk-plugin-auth/client/login/containers/ResendEmailConfirmation.js b/plugins/talk-plugin-auth/client/login/containers/ResendEmailConfirmation.js
index 6edeb82f2..5005ded43 100644
--- a/plugins/talk-plugin-auth/client/login/containers/ResendEmailConfirmation.js
+++ b/plugins/talk-plugin-auth/client/login/containers/ResendEmailConfirmation.js
@@ -59,6 +59,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withResendEmailConfirmation
)(ResendEmailConfirmatonContainer);
diff --git a/plugins/talk-plugin-auth/client/login/containers/SignIn.js b/plugins/talk-plugin-auth/client/login/containers/SignIn.js
index 77c6a8614..a22e64ae7 100644
--- a/plugins/talk-plugin-auth/client/login/containers/SignIn.js
+++ b/plugins/talk-plugin-auth/client/login/containers/SignIn.js
@@ -89,6 +89,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSignIn
)(SignInContainer);
diff --git a/plugins/talk-plugin-auth/client/login/containers/SignUp.js b/plugins/talk-plugin-auth/client/login/containers/SignUp.js
index f7fc6f2d2..d908c42d3 100644
--- a/plugins/talk-plugin-auth/client/login/containers/SignUp.js
+++ b/plugins/talk-plugin-auth/client/login/containers/SignUp.js
@@ -145,6 +145,9 @@ const mapDispatchToProps = dispatch =>
);
export default compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withSignUp
)(SignUpContainer);
diff --git a/plugins/talk-plugin-auth/client/stream/containers/SetUsernameDialog.js b/plugins/talk-plugin-auth/client/stream/containers/SetUsernameDialog.js
index 93c7ea74b..62f4abc39 100644
--- a/plugins/talk-plugin-auth/client/stream/containers/SetUsernameDialog.js
+++ b/plugins/talk-plugin-auth/client/stream/containers/SetUsernameDialog.js
@@ -58,7 +58,10 @@ const mapStateToProps = state => ({
});
export default compose(
- connect(mapStateToProps, null),
+ connect(
+ mapStateToProps,
+ null
+ ),
withSetUsername,
branch(props => !props.username, renderNothing)
)(SetUsernameDialogContainer);
diff --git a/plugins/talk-plugin-auth/client/stream/containers/SignInButton.js b/plugins/talk-plugin-auth/client/stream/containers/SignInButton.js
index 87b2a900f..181e93d32 100644
--- a/plugins/talk-plugin-auth/client/stream/containers/SignInButton.js
+++ b/plugins/talk-plugin-auth/client/stream/containers/SignInButton.js
@@ -11,4 +11,7 @@ const mapStateToProps = state => ({
const mapDispatchToProps = dispatch =>
bindActionCreators({ showSignInDialog }, dispatch);
-export default connect(mapStateToProps, mapDispatchToProps)(SignInButton);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(SignInButton);
diff --git a/plugins/talk-plugin-auth/client/stream/containers/UserBox.js b/plugins/talk-plugin-auth/client/stream/containers/UserBox.js
index 720a61087..2743a1e70 100644
--- a/plugins/talk-plugin-auth/client/stream/containers/UserBox.js
+++ b/plugins/talk-plugin-auth/client/stream/containers/UserBox.js
@@ -10,4 +10,7 @@ const mapStateToProps = state => ({
const mapDispatchToProps = dispatch => bindActionCreators({ logout }, dispatch);
-export default connect(mapStateToProps, mapDispatchToProps)(UserBox);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(UserBox);
diff --git a/plugins/talk-plugin-author-menu/client/containers/AuthorName.js b/plugins/talk-plugin-author-menu/client/containers/AuthorName.js
index e385058c4..83a897ab6 100644
--- a/plugins/talk-plugin-author-menu/client/containers/AuthorName.js
+++ b/plugins/talk-plugin-author-menu/client/containers/AuthorName.js
@@ -122,7 +122,10 @@ const withAuthorNameFragments = withFragments({
});
const enhance = compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withAuthorNameFragments
);
diff --git a/plugins/talk-plugin-deep-reply-count/index.js b/plugins/talk-plugin-deep-reply-count/index.js
index 4c06329a7..1f02d30e0 100644
--- a/plugins/talk-plugin-deep-reply-count/index.js
+++ b/plugins/talk-plugin-deep-reply-count/index.js
@@ -85,7 +85,13 @@ module.exports = {
}),
resolvers: {
Comment: {
- deepReplyCount({ id }, args, { loaders: { Comments } }) {
+ deepReplyCount(
+ { id },
+ args,
+ {
+ loaders: { Comments },
+ }
+ ) {
return Comments.getDeepCount.load(id);
},
},
diff --git a/plugins/talk-plugin-facebook-auth/client/containers/FacebookButton.js b/plugins/talk-plugin-facebook-auth/client/containers/FacebookButton.js
index 8ae3ff01e..348c6cb61 100644
--- a/plugins/talk-plugin-facebook-auth/client/containers/FacebookButton.js
+++ b/plugins/talk-plugin-facebook-auth/client/containers/FacebookButton.js
@@ -6,4 +6,7 @@ import FacebookButton from '../components/FacebookButton';
const mapDispatchToProps = dispatch =>
bindActionCreators({ onClick: loginWithFacebook }, dispatch);
-export default connect(null, mapDispatchToProps)(FacebookButton);
+export default connect(
+ null,
+ mapDispatchToProps
+)(FacebookButton);
diff --git a/plugins/talk-plugin-facebook-auth/server/router.js b/plugins/talk-plugin-facebook-auth/server/router.js
index 10d2469da..4d72237d2 100644
--- a/plugins/talk-plugin-facebook-auth/server/router.js
+++ b/plugins/talk-plugin-facebook-auth/server/router.js
@@ -5,7 +5,11 @@ module.exports = router => {
*/
router.get('/api/v1/auth/facebook', (req, res, next) => {
const {
- connectors: { services: { Passport: { passport } } },
+ connectors: {
+ services: {
+ Passport: { passport },
+ },
+ },
} = req.context;
return passport.authenticate('facebook', {
@@ -22,7 +26,9 @@ module.exports = router => {
router.get('/api/v1/auth/facebook/callback', (req, res, next) => {
const {
connectors: {
- services: { Passport: { passport, HandleAuthPopupCallback } },
+ services: {
+ Passport: { passport, HandleAuthPopupCallback },
+ },
},
} = req.context;
diff --git a/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js b/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js
index c3ad0a96d..b988f1a6c 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js
@@ -19,7 +19,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
- connect(mapStateToProps, mapDispatchToProps),
+ connect(
+ mapStateToProps,
+ mapDispatchToProps
+ ),
withTags('featured')
);
diff --git a/plugins/talk-plugin-featured-comments/client/containers/ModActionButton.js b/plugins/talk-plugin-featured-comments/client/containers/ModActionButton.js
index 7c8f94fb3..b5302c73d 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/ModActionButton.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/ModActionButton.js
@@ -13,7 +13,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withTags('featured')
);
diff --git a/plugins/talk-plugin-featured-comments/client/containers/ModIndicatorSubscription.js b/plugins/talk-plugin-featured-comments/client/containers/ModIndicatorSubscription.js
index a8153b49e..5780459dd 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/ModIndicatorSubscription.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/ModIndicatorSubscription.js
@@ -12,7 +12,13 @@ class ModIndicatorSubscription extends React.Component {
document: COMMENT_FEATURED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentFeatured: { comment } } } }
+ {
+ subscriptionData: {
+ data: {
+ commentFeatured: { comment },
+ },
+ },
+ }
) => {
return this.props.handleCommentChange(prev, comment);
},
@@ -21,7 +27,13 @@ class ModIndicatorSubscription extends React.Component {
document: COMMENT_UNFEATURED_SUBSCRIPTION,
updateQuery: (
prev,
- { subscriptionData: { data: { commentUnfeatured: { comment } } } }
+ {
+ subscriptionData: {
+ data: {
+ commentUnfeatured: { comment },
+ },
+ },
+ }
) => {
return this.props.handleCommentChange(prev, comment);
},
diff --git a/plugins/talk-plugin-featured-comments/client/containers/ModSubscription.js b/plugins/talk-plugin-featured-comments/client/containers/ModSubscription.js
index d91d69304..fa7d95ba6 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/ModSubscription.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/ModSubscription.js
@@ -28,7 +28,13 @@ class ModSubscription extends React.Component {
},
updateQuery: (
prev,
- { subscriptionData: { data: { commentFeatured: { user, comment } } } }
+ {
+ subscriptionData: {
+ data: {
+ commentFeatured: { user, comment },
+ },
+ },
+ }
) => {
const notifyText =
this.props.user.id === user.id
@@ -50,7 +56,9 @@ class ModSubscription extends React.Component {
prev,
{
subscriptionData: {
- data: { commentUnfeatured: { user, comment } },
+ data: {
+ commentUnfeatured: { user, comment },
+ },
},
}
) => {
@@ -117,7 +125,10 @@ const mapStateToProps = state => ({
});
export default compose(
- connect(mapStateToProps, null),
+ connect(
+ mapStateToProps,
+ null
+ ),
withVariables,
withSubscribeToMore
)(ModSubscription);
diff --git a/plugins/talk-plugin-featured-comments/client/containers/ModTag.js b/plugins/talk-plugin-featured-comments/client/containers/ModTag.js
index 42c653418..72a035ff4 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/ModTag.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/ModTag.js
@@ -22,7 +22,10 @@ const fragments = {
`,
};
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withTags('featured', { fragments })
);
diff --git a/plugins/talk-plugin-featured-comments/client/containers/TabPane.js b/plugins/talk-plugin-featured-comments/client/containers/TabPane.js
index b3f44b429..59caa9af9 100644
--- a/plugins/talk-plugin-featured-comments/client/containers/TabPane.js
+++ b/plugins/talk-plugin-featured-comments/client/containers/TabPane.js
@@ -90,7 +90,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withFetchMore,
withVariables,
withFragments({
diff --git a/plugins/talk-plugin-featured-comments/index.js b/plugins/talk-plugin-featured-comments/index.js
index 6dd3114e1..27deb9c05 100644
--- a/plugins/talk-plugin-featured-comments/index.js
+++ b/plugins/talk-plugin-featured-comments/index.js
@@ -59,8 +59,14 @@ module.exports = {
addTag: {
async post(
obj,
- { tag: { name, id, item_type } },
- { user, mutators: { Comment }, pubsub }
+ {
+ tag: { name, id, item_type },
+ },
+ {
+ user,
+ mutators: { Comment },
+ pubsub,
+ }
) {
if (name === 'FEATURED' && item_type === 'COMMENTS') {
const comment = await Comment.setStatus({
@@ -76,8 +82,14 @@ module.exports = {
removeTag: {
async post(
obj,
- { tag: { name, id, item_type } },
- { user, loaders: { Comments }, pubsub }
+ {
+ tag: { name, id, item_type },
+ },
+ {
+ user,
+ loaders: { Comments },
+ pubsub,
+ }
) {
if (name === 'FEATURED' && item_type === 'COMMENTS') {
const comment = await Comments.get.load(id);
diff --git a/plugins/talk-plugin-flag-details/client/components/FlagDetails.js b/plugins/talk-plugin-flag-details/client/components/FlagDetails.js
index 7900f5b50..75871fb57 100644
--- a/plugins/talk-plugin-flag-details/client/components/FlagDetails.js
+++ b/plugins/talk-plugin-flag-details/client/components/FlagDetails.js
@@ -10,7 +10,12 @@ import {
class FlagDetails extends Component {
render() {
- const { comment: { actions }, more, root, comment } = this.props;
+ const {
+ comment: { actions },
+ more,
+ root,
+ comment,
+ } = this.props;
const flagActions =
actions && actions.filter(a => a.__typename === 'FlagAction');
diff --git a/plugins/talk-plugin-flag-details/client/components/UserFlagDetails.js b/plugins/talk-plugin-flag-details/client/components/UserFlagDetails.js
index 30f83ad9d..9b9982882 100644
--- a/plugins/talk-plugin-flag-details/client/components/UserFlagDetails.js
+++ b/plugins/talk-plugin-flag-details/client/components/UserFlagDetails.js
@@ -5,7 +5,10 @@ import styles from './UserFlagDetails.css';
class UserFlagDetails extends Component {
render() {
- const { comment: { actions }, viewUserDetail } = this.props;
+ const {
+ comment: { actions },
+ viewUserDetail,
+ } = this.props;
const flagActions =
actions && actions.filter(a => a.__typename === 'FlagAction');
diff --git a/plugins/talk-plugin-flag-details/client/containers/UserFlagDetails.js b/plugins/talk-plugin-flag-details/client/containers/UserFlagDetails.js
index 7dd867456..c52f15192 100644
--- a/plugins/talk-plugin-flag-details/client/containers/UserFlagDetails.js
+++ b/plugins/talk-plugin-flag-details/client/containers/UserFlagDetails.js
@@ -15,7 +15,10 @@ const mapDispatchToProps = dispatch => ({
});
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withFragments({
comment: gql`
fragment CoralAdmin_UserFlagDetails_comment on Comment {
diff --git a/plugins/talk-plugin-google-auth/client/containers/GoogleButton.js b/plugins/talk-plugin-google-auth/client/containers/GoogleButton.js
index d1982e351..390f1a722 100644
--- a/plugins/talk-plugin-google-auth/client/containers/GoogleButton.js
+++ b/plugins/talk-plugin-google-auth/client/containers/GoogleButton.js
@@ -6,4 +6,7 @@ import GoogleButton from '../components/GoogleButton';
const mapDispatchToProps = dispatch =>
bindActionCreators({ onClick: loginWithGoogle }, dispatch);
-export default connect(null, mapDispatchToProps)(GoogleButton);
+export default connect(
+ null,
+ mapDispatchToProps
+)(GoogleButton);
diff --git a/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserAction.js b/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserAction.js
index 033be6ed6..b76ba8c3f 100644
--- a/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserAction.js
+++ b/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserAction.js
@@ -45,7 +45,10 @@ const withIgnoreUserActionFragments = withFragments({
});
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withIgnoreUserActionFragments,
excludeIf(({ root: { me }, comment }) => !me || me.id === comment.user.id)
);
diff --git a/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserConfirmation.js b/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserConfirmation.js
index efd4cd366..a4d39e4df 100644
--- a/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserConfirmation.js
+++ b/plugins/talk-plugin-ignore-user/client/containers/IgnoreUserConfirmation.js
@@ -65,7 +65,10 @@ const withIgnoreUserConfirmationFragments = withFragments({
});
const enhance = compose(
- connect(null, mapDispatchToProps),
+ connect(
+ null,
+ mapDispatchToProps
+ ),
withIgnoreUserConfirmationFragments,
withIgnoreUser
);
diff --git a/plugins/talk-plugin-ignore-user/client/containers/IgnoredUserSection.js b/plugins/talk-plugin-ignore-user/client/containers/IgnoredUserSection.js
index 36bb477c4..91075f20a 100644
--- a/plugins/talk-plugin-ignore-user/client/containers/IgnoredUserSection.js
+++ b/plugins/talk-plugin-ignore-user/client/containers/IgnoredUserSection.js
@@ -37,6 +37,9 @@ const withIgnoredUserSectionFragments = withFragments({
`,
});
-const enhance = compose(withIgnoredUserSectionFragments, withStopIgnoringUser);
+const enhance = compose(
+ withIgnoredUserSectionFragments,
+ withStopIgnoringUser
+);
export default enhance(IgnoredUserSectionContainer);
diff --git a/plugins/talk-plugin-local-auth/client/components/AddEmailAddressDialog.js b/plugins/talk-plugin-local-auth/client/components/AddEmailAddressDialog.js
index a5bfd7096..00912fdfd 100644
--- a/plugins/talk-plugin-local-auth/client/components/AddEmailAddressDialog.js
+++ b/plugins/talk-plugin-local-auth/client/components/AddEmailAddressDialog.js
@@ -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 (