Skip to content

Commit 2a2ba9f

Browse files
committed
aa
1 parent 295c790 commit 2a2ba9f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.changeset/neat-cows-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
Reenable running `require-id-when-available` on `FragmentDefinition`

packages/plugin/src/rules/require-selections/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ ruleTester.run<RuleOptions, true>('require-selections', rule, {
499499
documents: '{ foo }',
500500
},
501501
},
502-
errors: 2
502+
errors: 2,
503503
},
504504
],
505505
});

packages/plugin/src/rules/require-selections/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ export const rule: GraphQLESLintRule<RuleOptions, true> = {
118118

119119
// Check selections only in OperationDefinition,
120120
// skip selections of OperationDefinition and InlineFragment
121-
const selector =
122-
'SelectionSet[parent.kind!=/(^OperationDefinition|InlineFragment)$/]';
121+
const selector = 'SelectionSet[parent.kind!=/(^OperationDefinition|InlineFragment)$/]';
123122
const typeInfo = new TypeInfo(schema);
124123

125124
function checkFragments(node: GraphQLESTreeNode<SelectionSetNode>): void {

0 commit comments

Comments
 (0)