Skip to content

Commit

Permalink
feat(eslint): eslint rules updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntgnst committed Dec 18, 2021
1 parent bf6cf92 commit ce90706
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ module.exports = {
'no-constant-condition': 'off',
'no-await-in-loop': 'off',
'template-curly-spacing': 'off',
'consistent-return': 'off',
'prefer-const': 'off',
'no-throw-literal': 'off',
indent: [
'error',
2,
Expand Down
4 changes: 3 additions & 1 deletion src/internal/applyInheritsDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const applyInheritsDirective = ({ typeDefs, resolvers }) => {

// Directive parameter if is not in types.
if (!(inheritedType in objectTypeMap)) {
throw `Invalid parameter. Parameter ${inheritedType} not in type definitions.`;
throw new Error(`Invalid parameter. Parameter ${inheritedType} not in type definitions.`);
}

const { fieldDefs, fieldResolvers } = objectTypeMap[inheritedType];
Expand All @@ -35,6 +35,8 @@ const applyInheritsDirective = ({ typeDefs, resolvers }) => {
return { ...node, fields: [...fieldDefs, ...node.fields] };
}
}

return undefined;
},
},
});
Expand Down
1 change: 1 addition & 0 deletions src/internal/mergeResolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const extend = (extendedResolver) => ({
});

const mergeResolvers = (allResolvers) => {
// eslint-disable-next-line prefer-const
let [firstResolversConfig, ...rest] = allResolvers;

rest.forEach((resolversConfigs) => {
Expand Down

0 comments on commit ce90706

Please sign in to comment.