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
@@ -19,7 +19,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
withTags('featured')
);
@@ -13,7 +13,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withTags('featured')
);
@@ -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);
},
@@ -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);
@@ -22,7 +22,10 @@ const fragments = {
`,
};
const enhance = compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withTags('featured', { fragments })
);
@@ -90,7 +90,10 @@ const mapDispatchToProps = dispatch =>
);
const enhance = compose(
connect(null, mapDispatchToProps),
connect(
null,
mapDispatchToProps
),
withFetchMore,
withVariables,
withFragments({
+16 -4
View File
@@ -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);