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 'no-unused-vars' check #261

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 @@ -204,7 +204,7 @@ rules:
no-undef: error
no-undef-init: error
no-undefined: off
no-unused-vars: off # TODO [error, { vars: all, args: all, argsIgnorePattern: '^_' }]
no-unused-vars: [error, { vars: all, args: all, argsIgnorePattern: '^_' }]
no-use-before-define: off

# Stylistic Issues
Expand Down
2 changes: 1 addition & 1 deletion src/mutation/__tests__/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const simpleRootValueMutation = mutationWithClientMutationId({
type: GraphQLInt,
},
},
mutateAndGetPayload: (params, context, { rootValue }) => rootValue,
mutateAndGetPayload: (_params, _context, { rootValue }) => rootValue,
});

const queryType = new GraphQLObjectType({
Expand Down
2 changes: 1 addition & 1 deletion src/node/__tests__/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const photoData = {
};

const { nodeField, nodesField, nodeInterface } = nodeDefinitions(
(id, context, info) => {
(id, _context, info) => {
expect(info.schema).to.equal(schema);
if (userData[id]) {
return userData[id];
Expand Down
6 changes: 3 additions & 3 deletions src/node/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function nodeDefinitions<TContext>(
description: 'The ID of an object',
},
},
resolve: (obj, { id }, context, info) => idFetcher(id, context, info),
resolve: (_obj, { id }, context, info) => idFetcher(id, context, info),
};

const nodesField = {
Expand All @@ -70,7 +70,7 @@ export function nodeDefinitions<TContext>(
description: 'The IDs of objects',
},
},
resolve: (obj, { ids }, context, info) =>
resolve: (_obj, { ids }, context, info) =>
Promise.all(
ids.map((id) => Promise.resolve(idFetcher(id, context, info))),
),
Expand Down Expand Up @@ -118,7 +118,7 @@ export function globalIdField(
return {
description: 'The ID of an object',
type: new GraphQLNonNull(GraphQLID),
resolve: (obj, args, context, info) =>
resolve: (obj, _args, context, info) =>
toGlobalId(
typeName ?? info.parentType.name,
idFetcher ? idFetcher(obj, context, info) : obj.id,
Expand Down
2 changes: 1 addition & 1 deletion src/node/plural.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function pluralIdentifyingRootField(
description: config.description,
type: new GraphQLList(config.outputType),
args: inputArgs,
resolve(obj, args, context, info) {
resolve(_obj, args, context, info) {
const inputs = args[config.argName];
return Promise.all(
inputs.map((input) =>
Expand Down