Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint: enable 'arrow-body-style' rule #262

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ rules:
# ECMAScript 6
# https://eslint.org/docs/rules/#ecmascript-6

arrow-body-style: off # TODO error
arrow-body-style: error
constructor-super: error
no-class-assign: error
no-const-assign: error
Expand Down
4 changes: 1 addition & 3 deletions src/__tests__/starWarsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ const { nodeInterface, nodeField } = nodeDefinitions(
return getShip(id);
}
},
(obj) => {
return obj.ships ? factionType : shipType;
},
(obj) => (obj.ships ? factionType : shipType),
);

/**
Expand Down
7 changes: 3 additions & 4 deletions src/mutation/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ export function mutationWithClientMutationId(
args: {
input: { type: new GraphQLNonNull(inputType) },
},
resolve: (_, { input }, context, info) => {
return Promise.resolve(mutateAndGetPayload(input, context, info)).then(
resolve: (_, { input }, context, info) =>
Promise.resolve(mutateAndGetPayload(input, context, info)).then(
(payload) => {
payload.clientMutationId = input.clientMutationId;
return payload;
},
);
},
),
};
}
8 changes: 2 additions & 6 deletions src/node/__tests__/nodeasync.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ const userData = {
};

const { nodeField, nodeInterface } = nodeDefinitions(
(id) => {
return userData[id];
},
() => {
return userType;
},
(id) => userData[id],
() => userType,
);

const userType = new GraphQLObjectType({
Expand Down