@graphql-eslint/eslint-plugin 4.4.0-alpha-20241210122018-181d10f9b0a3e9b73e3de466eecce3342d1c5232 → 4.4.0-alpha-20241210123322-201a14b05ca7626b07c4afd5939919c0a3bcda7e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1323 @@
1
+ import * as graphql from 'graphql';
2
+ import { ASTNode, TypeNode, TypeInfo, DocumentNode, DefinitionNode, EnumValueDefinitionNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, InputValueDefinitionNode, DirectiveDefinitionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, SelectionSetNode, ExecutableDefinitionNode, FieldNode, InlineFragmentNode, SelectionNode, NameNode, DirectiveNode, VariableNode, VariableDefinitionNode, ArgumentNode, FragmentSpreadNode, NamedTypeNode, TypeDefinitionNode, TypeExtensionNode, ListTypeNode, NonNullTypeNode, OperationTypeDefinitionNode, FragmentDefinitionNode, OperationDefinitionNode, OperationTypeNode, GraphQLSchema, ASTKindToNode } from 'graphql';
3
+ import * as eslint from 'eslint';
4
+ import { AST, Linter, Rule } from 'eslint';
5
+ import { IGraphQLConfig } from 'graphql-config';
6
+ export { IGraphQLConfig } from 'graphql-config';
7
+ import { SourceLocation, Comment } from 'estree';
8
+ export { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck';
9
+
10
+ type SafeGraphQLType<T extends ASTNode> = T extends {
11
+ type: TypeNode;
12
+ } ? Omit<T, 'loc' | 'type'> & {
13
+ gqlType: T['type'];
14
+ } : Omit<T, 'loc'>;
15
+ type Writeable<T> = {
16
+ -readonly [K in keyof T]: T[K];
17
+ };
18
+ type TypeInformation = {
19
+ argument: ReturnType<TypeInfo['getArgument']>;
20
+ defaultValue: ReturnType<TypeInfo['getDefaultValue']>;
21
+ directive: ReturnType<TypeInfo['getDirective']>;
22
+ enumValue: ReturnType<TypeInfo['getEnumValue']>;
23
+ fieldDef: ReturnType<TypeInfo['getFieldDef']>;
24
+ inputType: ReturnType<TypeInfo['getInputType']>;
25
+ parentInputType: ReturnType<TypeInfo['getParentInputType']>;
26
+ parentType: ReturnType<TypeInfo['getParentType']>;
27
+ gqlType: ReturnType<TypeInfo['getType']>;
28
+ };
29
+ type NodeWithName = ArgumentNode | DirectiveDefinitionNode | EnumValueDefinitionNode | ExecutableDefinitionNode | FieldDefinitionNode | FieldNode | FragmentSpreadNode | NamedTypeNode | TypeDefinitionNode | TypeExtensionNode | VariableNode;
30
+ type NodeWithType = FieldDefinitionNode | InputValueDefinitionNode | ListTypeNode | NonNullTypeNode | OperationTypeDefinitionNode | VariableDefinitionNode;
31
+ type ParentNode<T> = T extends DocumentNode ? AST.Program : T extends DefinitionNode ? DocumentNode : T extends EnumValueDefinitionNode ? EnumTypeDefinitionNode | EnumTypeExtensionNode : T extends InputValueDefinitionNode ? DirectiveDefinitionNode | FieldDefinitionNode | InputObjectTypeDefinitionNode | InputObjectTypeExtensionNode : T extends FieldDefinitionNode ? InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode | ObjectTypeExtensionNode : T extends SelectionSetNode ? ExecutableDefinitionNode | FieldNode | InlineFragmentNode : T extends SelectionNode ? SelectionSetNode : T extends TypeNode ? NodeWithType : T extends NameNode ? NodeWithName : T extends DirectiveNode ? InputObjectTypeDefinitionNode | ObjectTypeDefinitionNode : T extends VariableNode ? VariableDefinitionNode : unknown;
32
+ type Node<T extends ASTNode, WithTypeInfo extends boolean> = Writeable<SafeGraphQLType<T>> & {
33
+ type: T['kind'];
34
+ loc: SourceLocation;
35
+ range: AST.Range;
36
+ leadingComments: Comment[];
37
+ typeInfo: () => WithTypeInfo extends true ? TypeInformation : Record<string, never>;
38
+ rawNode: () => T;
39
+ parent: GraphQLESTreeNode<ParentNode<T>>;
40
+ };
41
+ type GraphQLESTreeNode<T, W extends boolean = false> = T extends ASTNode ? {
42
+ [K in keyof Node<T, W>]: Node<T, W>[K] extends ReadonlyArray<infer ArrayItem> | undefined ? GraphQLESTreeNode<ArrayItem, W>[] : GraphQLESTreeNode<Node<T, W>[K], W>;
43
+ } : T extends AST.Program ? T & {
44
+ parent: null;
45
+ } : T;
46
+
47
+ type FragmentSource = {
48
+ filePath: string;
49
+ document: FragmentDefinitionNode;
50
+ };
51
+ type OperationSource = {
52
+ filePath: string;
53
+ document: OperationDefinitionNode;
54
+ };
55
+ type SiblingOperations = {
56
+ available: boolean;
57
+ getFragment(fragmentName: string): FragmentSource[];
58
+ getFragments(): FragmentSource[];
59
+ getFragmentByType(typeName: string): FragmentSource[];
60
+ getFragmentsInUse(baseOperation: FragmentDefinitionNode | OperationDefinitionNode | SelectionSetNode, recursive?: boolean): FragmentDefinitionNode[];
61
+ getOperation(operationName: string): OperationSource[];
62
+ getOperations(): OperationSource[];
63
+ getOperationByType(operationType: OperationTypeNode): OperationSource[];
64
+ };
65
+
66
+ type Schema = GraphQLSchema | null;
67
+ type Pointer = string | string[];
68
+
69
+ interface ParserOptions {
70
+ graphQLConfig?: IGraphQLConfig;
71
+ filePath: string;
72
+ }
73
+ type ParserServices = {
74
+ schema: Schema;
75
+ siblingOperations: SiblingOperations;
76
+ };
77
+ type GraphQLESLintParseResult = Linter.ESLintParseResult & {
78
+ services: ParserServices;
79
+ };
80
+ type ReportDescriptorLocation = any;
81
+ type ReportDescriptor = ReportDescriptorLocation & Rule.ReportDescriptorMessage & Rule.ReportDescriptorOptions;
82
+ type GraphQLESLintRuleContext<Options = any[]> = Omit<Rule.RuleContext, 'options' | 'report'> & {
83
+ options: Options;
84
+ report(descriptor: ReportDescriptor): void;
85
+ };
86
+ type CategoryType = 'schema' | 'operations' | 'schema-and-operations';
87
+ type RuleMetaDataDocs = Required<Rule.RuleMetaData>['docs'];
88
+ type RuleDocsInfo<T> = Omit<RuleMetaDataDocs, 'category' | 'suggestion'> & {
89
+ category?: string;
90
+ requiresSchema?: true;
91
+ requiresSiblings?: true;
92
+ examples?: {
93
+ title: string;
94
+ code: string;
95
+ usage?: T;
96
+ }[];
97
+ configOptions?: T | {
98
+ schema?: T;
99
+ operations?: T;
100
+ };
101
+ graphQLJSRuleName?: string;
102
+ isDisabledForAllConfig?: true;
103
+ whenNotToUseIt?: string;
104
+ };
105
+ type GraphQLESLintRuleListener<WithTypeInfo extends boolean = false> = Record<string, any> & {
106
+ [K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode<ASTKindToNode[K], WithTypeInfo>) => void;
107
+ };
108
+ type GraphQLESLintRule<Options = [], WithTypeInfo extends boolean = false> = {
109
+ meta?: Omit<Rule.RuleMetaData, 'docs'> & {
110
+ docs?: RuleDocsInfo<Options>;
111
+ };
112
+ create(context: GraphQLESLintRuleContext<Options>): GraphQLESLintRuleListener<WithTypeInfo>;
113
+ };
114
+ type ValueOf<T> = T[keyof T];
115
+ type Id<T> = {
116
+ [P in keyof T]: T[P];
117
+ } & {};
118
+ type OmitDistributive<T, K extends PropertyKey> = T extends object ? Id<OmitRecursively<T, K>> : T;
119
+ type OmitRecursively<T extends object, K extends PropertyKey> = Omit<{
120
+ [P in keyof T]: OmitDistributive<T[P], K>;
121
+ }, K>;
122
+ type ConfigName = 'operations-all' | 'operations-recommended' | 'schema-all' | 'schema-recommended' | 'schema-relay';
123
+
124
+ declare function requireGraphQLOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
125
+ declare function requireGraphQLSchema(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
126
+ type CaseStyle = 'camelCase' | 'kebab-case' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
127
+
128
+ type Block = Linter.ProcessorFile & {
129
+ lineOffset: number;
130
+ offset: number;
131
+ };
132
+
133
+ declare const configs: {
134
+ 'schema-recommended': {
135
+ parser: string;
136
+ plugins: string[];
137
+ rules: {
138
+ '@graphql-eslint/description-style': "error";
139
+ '@graphql-eslint/known-argument-names': "error";
140
+ '@graphql-eslint/known-directives': "error";
141
+ '@graphql-eslint/known-type-names': "error";
142
+ '@graphql-eslint/lone-schema-definition': "error";
143
+ '@graphql-eslint/naming-convention': ["error", {
144
+ types: string;
145
+ FieldDefinition: string;
146
+ InputValueDefinition: string;
147
+ Argument: string;
148
+ DirectiveDefinition: string;
149
+ EnumValueDefinition: string;
150
+ 'FieldDefinition[parent.name.value=Query]': {
151
+ forbiddenPrefixes: string[];
152
+ forbiddenSuffixes: string[];
153
+ };
154
+ 'FieldDefinition[parent.name.value=Mutation]': {
155
+ forbiddenPrefixes: string[];
156
+ forbiddenSuffixes: string[];
157
+ };
158
+ 'FieldDefinition[parent.name.value=Subscription]': {
159
+ forbiddenPrefixes: string[];
160
+ forbiddenSuffixes: string[];
161
+ };
162
+ 'EnumTypeDefinition,EnumTypeExtension': {
163
+ forbiddenPrefixes: string[];
164
+ forbiddenSuffixes: string[];
165
+ };
166
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
167
+ forbiddenPrefixes: string[];
168
+ forbiddenSuffixes: string[];
169
+ };
170
+ 'UnionTypeDefinition,UnionTypeExtension': {
171
+ forbiddenPrefixes: string[];
172
+ forbiddenSuffixes: string[];
173
+ };
174
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
175
+ forbiddenPrefixes: string[];
176
+ forbiddenSuffixes: string[];
177
+ };
178
+ }];
179
+ '@graphql-eslint/no-hashtag-description': "error";
180
+ '@graphql-eslint/no-typename-prefix': "error";
181
+ '@graphql-eslint/no-unreachable-types': "error";
182
+ '@graphql-eslint/possible-type-extension': "error";
183
+ '@graphql-eslint/provided-required-arguments': "error";
184
+ '@graphql-eslint/require-deprecation-reason': "error";
185
+ '@graphql-eslint/require-description': ["error", {
186
+ types: boolean;
187
+ DirectiveDefinition: boolean;
188
+ rootField: boolean;
189
+ }];
190
+ '@graphql-eslint/strict-id-in-types': "error";
191
+ '@graphql-eslint/unique-directive-names': "error";
192
+ '@graphql-eslint/unique-directive-names-per-location': "error";
193
+ '@graphql-eslint/unique-enum-value-names': "error";
194
+ '@graphql-eslint/unique-field-definition-names': "error";
195
+ '@graphql-eslint/unique-operation-types': "error";
196
+ '@graphql-eslint/unique-type-names': "error";
197
+ };
198
+ };
199
+ 'schema-all': {
200
+ extends: string;
201
+ rules: {
202
+ '@graphql-eslint/alphabetize': ["error", {
203
+ definitions: boolean;
204
+ fields: string[];
205
+ values: boolean;
206
+ arguments: string[];
207
+ groups: string[];
208
+ }];
209
+ '@graphql-eslint/input-name': "error";
210
+ '@graphql-eslint/no-root-type': ["error", {
211
+ disallow: string[];
212
+ }];
213
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
214
+ '@graphql-eslint/require-deprecation-date': "error";
215
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
216
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
217
+ '@graphql-eslint/require-nullable-result-in-root': "error";
218
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
219
+ };
220
+ };
221
+ 'schema-relay': {
222
+ parser: string;
223
+ plugins: string[];
224
+ rules: {
225
+ '@graphql-eslint/relay-arguments': "error";
226
+ '@graphql-eslint/relay-connection-types': "error";
227
+ '@graphql-eslint/relay-edge-types': "error";
228
+ '@graphql-eslint/relay-page-info': "error";
229
+ };
230
+ };
231
+ 'operations-recommended': {
232
+ parser: string;
233
+ plugins: string[];
234
+ rules: {
235
+ '@graphql-eslint/executable-definitions': "error";
236
+ '@graphql-eslint/fields-on-correct-type': "error";
237
+ '@graphql-eslint/fragments-on-composite-type': "error";
238
+ '@graphql-eslint/known-argument-names': "error";
239
+ '@graphql-eslint/known-directives': "error";
240
+ '@graphql-eslint/known-fragment-names': "error";
241
+ '@graphql-eslint/known-type-names': "error";
242
+ '@graphql-eslint/lone-anonymous-operation': "error";
243
+ '@graphql-eslint/naming-convention': ["error", {
244
+ VariableDefinition: string;
245
+ OperationDefinition: {
246
+ style: string;
247
+ forbiddenPrefixes: string[];
248
+ forbiddenSuffixes: string[];
249
+ };
250
+ FragmentDefinition: {
251
+ style: string;
252
+ forbiddenPrefixes: string[];
253
+ forbiddenSuffixes: string[];
254
+ };
255
+ }];
256
+ '@graphql-eslint/no-anonymous-operations': "error";
257
+ '@graphql-eslint/no-deprecated': "error";
258
+ '@graphql-eslint/no-duplicate-fields': "error";
259
+ '@graphql-eslint/no-fragment-cycles': "error";
260
+ '@graphql-eslint/no-undefined-variables': "error";
261
+ '@graphql-eslint/no-unused-fragments': "error";
262
+ '@graphql-eslint/no-unused-variables': "error";
263
+ '@graphql-eslint/one-field-subscriptions': "error";
264
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
265
+ '@graphql-eslint/possible-fragment-spread': "error";
266
+ '@graphql-eslint/provided-required-arguments': "error";
267
+ '@graphql-eslint/require-selections': "error";
268
+ '@graphql-eslint/scalar-leafs': "error";
269
+ '@graphql-eslint/selection-set-depth': ["error", {
270
+ maxDepth: number;
271
+ }];
272
+ '@graphql-eslint/unique-argument-names': "error";
273
+ '@graphql-eslint/unique-directive-names-per-location': "error";
274
+ '@graphql-eslint/unique-fragment-name': "error";
275
+ '@graphql-eslint/unique-input-field-names': "error";
276
+ '@graphql-eslint/unique-operation-name': "error";
277
+ '@graphql-eslint/unique-variable-names': "error";
278
+ '@graphql-eslint/value-literals-of-correct-type': "error";
279
+ '@graphql-eslint/variables-are-input-types': "error";
280
+ '@graphql-eslint/variables-in-allowed-position': "error";
281
+ };
282
+ };
283
+ 'operations-all': {
284
+ extends: string;
285
+ rules: {
286
+ '@graphql-eslint/alphabetize': ["error", {
287
+ definitions: boolean;
288
+ selections: string[];
289
+ variables: boolean;
290
+ arguments: string[];
291
+ groups: string[];
292
+ }];
293
+ '@graphql-eslint/lone-executable-definition': "error";
294
+ '@graphql-eslint/match-document-filename': ["error", {
295
+ query: string;
296
+ mutation: string;
297
+ subscription: string;
298
+ fragment: string;
299
+ }];
300
+ '@graphql-eslint/no-one-place-fragments': "error";
301
+ '@graphql-eslint/require-import-fragment': "error";
302
+ };
303
+ };
304
+ 'flat/schema-recommended': {
305
+ rules: {
306
+ '@graphql-eslint/description-style': "error";
307
+ '@graphql-eslint/known-argument-names': "error";
308
+ '@graphql-eslint/known-directives': "error";
309
+ '@graphql-eslint/known-type-names': "error";
310
+ '@graphql-eslint/lone-schema-definition': "error";
311
+ '@graphql-eslint/naming-convention': ["error", {
312
+ types: string;
313
+ FieldDefinition: string;
314
+ InputValueDefinition: string;
315
+ Argument: string;
316
+ DirectiveDefinition: string;
317
+ EnumValueDefinition: string;
318
+ 'FieldDefinition[parent.name.value=Query]': {
319
+ forbiddenPrefixes: string[];
320
+ forbiddenSuffixes: string[];
321
+ };
322
+ 'FieldDefinition[parent.name.value=Mutation]': {
323
+ forbiddenPrefixes: string[];
324
+ forbiddenSuffixes: string[];
325
+ };
326
+ 'FieldDefinition[parent.name.value=Subscription]': {
327
+ forbiddenPrefixes: string[];
328
+ forbiddenSuffixes: string[];
329
+ };
330
+ 'EnumTypeDefinition,EnumTypeExtension': {
331
+ forbiddenPrefixes: string[];
332
+ forbiddenSuffixes: string[];
333
+ };
334
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
335
+ forbiddenPrefixes: string[];
336
+ forbiddenSuffixes: string[];
337
+ };
338
+ 'UnionTypeDefinition,UnionTypeExtension': {
339
+ forbiddenPrefixes: string[];
340
+ forbiddenSuffixes: string[];
341
+ };
342
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
343
+ forbiddenPrefixes: string[];
344
+ forbiddenSuffixes: string[];
345
+ };
346
+ }];
347
+ '@graphql-eslint/no-hashtag-description': "error";
348
+ '@graphql-eslint/no-typename-prefix': "error";
349
+ '@graphql-eslint/no-unreachable-types': "error";
350
+ '@graphql-eslint/possible-type-extension': "error";
351
+ '@graphql-eslint/provided-required-arguments': "error";
352
+ '@graphql-eslint/require-deprecation-reason': "error";
353
+ '@graphql-eslint/require-description': ["error", {
354
+ types: boolean;
355
+ DirectiveDefinition: boolean;
356
+ rootField: boolean;
357
+ }];
358
+ '@graphql-eslint/strict-id-in-types': "error";
359
+ '@graphql-eslint/unique-directive-names': "error";
360
+ '@graphql-eslint/unique-directive-names-per-location': "error";
361
+ '@graphql-eslint/unique-enum-value-names': "error";
362
+ '@graphql-eslint/unique-field-definition-names': "error";
363
+ '@graphql-eslint/unique-operation-types': "error";
364
+ '@graphql-eslint/unique-type-names': "error";
365
+ };
366
+ };
367
+ 'flat/schema-all': {
368
+ rules: {
369
+ '@graphql-eslint/alphabetize': ["error", {
370
+ definitions: boolean;
371
+ fields: string[];
372
+ values: boolean;
373
+ arguments: string[];
374
+ groups: string[];
375
+ }];
376
+ '@graphql-eslint/input-name': "error";
377
+ '@graphql-eslint/no-root-type': ["error", {
378
+ disallow: string[];
379
+ }];
380
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
381
+ '@graphql-eslint/require-deprecation-date': "error";
382
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
383
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
384
+ '@graphql-eslint/require-nullable-result-in-root': "error";
385
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
386
+ '@graphql-eslint/description-style': "error";
387
+ '@graphql-eslint/known-argument-names': "error";
388
+ '@graphql-eslint/known-directives': "error";
389
+ '@graphql-eslint/known-type-names': "error";
390
+ '@graphql-eslint/lone-schema-definition': "error";
391
+ '@graphql-eslint/naming-convention': ["error", {
392
+ types: string;
393
+ FieldDefinition: string;
394
+ InputValueDefinition: string;
395
+ Argument: string;
396
+ DirectiveDefinition: string;
397
+ EnumValueDefinition: string;
398
+ 'FieldDefinition[parent.name.value=Query]': {
399
+ forbiddenPrefixes: string[];
400
+ forbiddenSuffixes: string[];
401
+ };
402
+ 'FieldDefinition[parent.name.value=Mutation]': {
403
+ forbiddenPrefixes: string[];
404
+ forbiddenSuffixes: string[];
405
+ };
406
+ 'FieldDefinition[parent.name.value=Subscription]': {
407
+ forbiddenPrefixes: string[];
408
+ forbiddenSuffixes: string[];
409
+ };
410
+ 'EnumTypeDefinition,EnumTypeExtension': {
411
+ forbiddenPrefixes: string[];
412
+ forbiddenSuffixes: string[];
413
+ };
414
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
415
+ forbiddenPrefixes: string[];
416
+ forbiddenSuffixes: string[];
417
+ };
418
+ 'UnionTypeDefinition,UnionTypeExtension': {
419
+ forbiddenPrefixes: string[];
420
+ forbiddenSuffixes: string[];
421
+ };
422
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
423
+ forbiddenPrefixes: string[];
424
+ forbiddenSuffixes: string[];
425
+ };
426
+ }];
427
+ '@graphql-eslint/no-hashtag-description': "error";
428
+ '@graphql-eslint/no-typename-prefix': "error";
429
+ '@graphql-eslint/no-unreachable-types': "error";
430
+ '@graphql-eslint/possible-type-extension': "error";
431
+ '@graphql-eslint/provided-required-arguments': "error";
432
+ '@graphql-eslint/require-deprecation-reason': "error";
433
+ '@graphql-eslint/require-description': ["error", {
434
+ types: boolean;
435
+ DirectiveDefinition: boolean;
436
+ rootField: boolean;
437
+ }];
438
+ '@graphql-eslint/strict-id-in-types': "error";
439
+ '@graphql-eslint/unique-directive-names': "error";
440
+ '@graphql-eslint/unique-directive-names-per-location': "error";
441
+ '@graphql-eslint/unique-enum-value-names': "error";
442
+ '@graphql-eslint/unique-field-definition-names': "error";
443
+ '@graphql-eslint/unique-operation-types': "error";
444
+ '@graphql-eslint/unique-type-names': "error";
445
+ };
446
+ };
447
+ 'flat/schema-relay': {
448
+ rules: {
449
+ '@graphql-eslint/relay-arguments': "error";
450
+ '@graphql-eslint/relay-connection-types': "error";
451
+ '@graphql-eslint/relay-edge-types': "error";
452
+ '@graphql-eslint/relay-page-info': "error";
453
+ };
454
+ };
455
+ 'flat/operations-recommended': {
456
+ rules: {
457
+ '@graphql-eslint/executable-definitions': "error";
458
+ '@graphql-eslint/fields-on-correct-type': "error";
459
+ '@graphql-eslint/fragments-on-composite-type': "error";
460
+ '@graphql-eslint/known-argument-names': "error";
461
+ '@graphql-eslint/known-directives': "error";
462
+ '@graphql-eslint/known-fragment-names': "error";
463
+ '@graphql-eslint/known-type-names': "error";
464
+ '@graphql-eslint/lone-anonymous-operation': "error";
465
+ '@graphql-eslint/naming-convention': ["error", {
466
+ VariableDefinition: string;
467
+ OperationDefinition: {
468
+ style: string;
469
+ forbiddenPrefixes: string[];
470
+ forbiddenSuffixes: string[];
471
+ };
472
+ FragmentDefinition: {
473
+ style: string;
474
+ forbiddenPrefixes: string[];
475
+ forbiddenSuffixes: string[];
476
+ };
477
+ }];
478
+ '@graphql-eslint/no-anonymous-operations': "error";
479
+ '@graphql-eslint/no-deprecated': "error";
480
+ '@graphql-eslint/no-duplicate-fields': "error";
481
+ '@graphql-eslint/no-fragment-cycles': "error";
482
+ '@graphql-eslint/no-undefined-variables': "error";
483
+ '@graphql-eslint/no-unused-fragments': "error";
484
+ '@graphql-eslint/no-unused-variables': "error";
485
+ '@graphql-eslint/one-field-subscriptions': "error";
486
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
487
+ '@graphql-eslint/possible-fragment-spread': "error";
488
+ '@graphql-eslint/provided-required-arguments': "error";
489
+ '@graphql-eslint/require-selections': "error";
490
+ '@graphql-eslint/scalar-leafs': "error";
491
+ '@graphql-eslint/selection-set-depth': ["error", {
492
+ maxDepth: number;
493
+ }];
494
+ '@graphql-eslint/unique-argument-names': "error";
495
+ '@graphql-eslint/unique-directive-names-per-location': "error";
496
+ '@graphql-eslint/unique-fragment-name': "error";
497
+ '@graphql-eslint/unique-input-field-names': "error";
498
+ '@graphql-eslint/unique-operation-name': "error";
499
+ '@graphql-eslint/unique-variable-names': "error";
500
+ '@graphql-eslint/value-literals-of-correct-type': "error";
501
+ '@graphql-eslint/variables-are-input-types': "error";
502
+ '@graphql-eslint/variables-in-allowed-position': "error";
503
+ };
504
+ };
505
+ 'flat/operations-all': {
506
+ rules: {
507
+ '@graphql-eslint/alphabetize': ["error", {
508
+ definitions: boolean;
509
+ selections: string[];
510
+ variables: boolean;
511
+ arguments: string[];
512
+ groups: string[];
513
+ }];
514
+ '@graphql-eslint/lone-executable-definition': "error";
515
+ '@graphql-eslint/match-document-filename': ["error", {
516
+ query: string;
517
+ mutation: string;
518
+ subscription: string;
519
+ fragment: string;
520
+ }];
521
+ '@graphql-eslint/no-one-place-fragments': "error";
522
+ '@graphql-eslint/require-import-fragment': "error";
523
+ '@graphql-eslint/executable-definitions': "error";
524
+ '@graphql-eslint/fields-on-correct-type': "error";
525
+ '@graphql-eslint/fragments-on-composite-type': "error";
526
+ '@graphql-eslint/known-argument-names': "error";
527
+ '@graphql-eslint/known-directives': "error";
528
+ '@graphql-eslint/known-fragment-names': "error";
529
+ '@graphql-eslint/known-type-names': "error";
530
+ '@graphql-eslint/lone-anonymous-operation': "error";
531
+ '@graphql-eslint/naming-convention': ["error", {
532
+ VariableDefinition: string;
533
+ OperationDefinition: {
534
+ style: string;
535
+ forbiddenPrefixes: string[];
536
+ forbiddenSuffixes: string[];
537
+ };
538
+ FragmentDefinition: {
539
+ style: string;
540
+ forbiddenPrefixes: string[];
541
+ forbiddenSuffixes: string[];
542
+ };
543
+ }];
544
+ '@graphql-eslint/no-anonymous-operations': "error";
545
+ '@graphql-eslint/no-deprecated': "error";
546
+ '@graphql-eslint/no-duplicate-fields': "error";
547
+ '@graphql-eslint/no-fragment-cycles': "error";
548
+ '@graphql-eslint/no-undefined-variables': "error";
549
+ '@graphql-eslint/no-unused-fragments': "error";
550
+ '@graphql-eslint/no-unused-variables': "error";
551
+ '@graphql-eslint/one-field-subscriptions': "error";
552
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
553
+ '@graphql-eslint/possible-fragment-spread': "error";
554
+ '@graphql-eslint/provided-required-arguments': "error";
555
+ '@graphql-eslint/require-selections': "error";
556
+ '@graphql-eslint/scalar-leafs': "error";
557
+ '@graphql-eslint/selection-set-depth': ["error", {
558
+ maxDepth: number;
559
+ }];
560
+ '@graphql-eslint/unique-argument-names': "error";
561
+ '@graphql-eslint/unique-directive-names-per-location': "error";
562
+ '@graphql-eslint/unique-fragment-name': "error";
563
+ '@graphql-eslint/unique-input-field-names': "error";
564
+ '@graphql-eslint/unique-operation-name': "error";
565
+ '@graphql-eslint/unique-variable-names': "error";
566
+ '@graphql-eslint/value-literals-of-correct-type': "error";
567
+ '@graphql-eslint/variables-are-input-types': "error";
568
+ '@graphql-eslint/variables-in-allowed-position': "error";
569
+ };
570
+ };
571
+ };
572
+
573
+ declare function parseForESLint(code: string, options: ParserOptions): GraphQLESLintParseResult;
574
+ declare const parser: {
575
+ parseForESLint: typeof parseForESLint;
576
+ meta: {
577
+ name: string;
578
+ version: string | undefined;
579
+ };
580
+ };
581
+
582
+ declare const rules: {
583
+ alphabetize: GraphQLESLintRule<{
584
+ values?: boolean | undefined;
585
+ definitions?: boolean | undefined;
586
+ fields?: ("InputObjectTypeDefinition" | "InterfaceTypeDefinition" | "ObjectTypeDefinition")[] | undefined;
587
+ selections?: ("FragmentDefinition" | "OperationDefinition")[] | undefined;
588
+ variables?: boolean | undefined;
589
+ arguments?: ("Directive" | "DirectiveDefinition" | "Field" | "FieldDefinition")[] | undefined;
590
+ groups?: string[] | undefined;
591
+ }[]>;
592
+ 'description-style': GraphQLESLintRule<{
593
+ style: "block" | "inline";
594
+ }[]>;
595
+ 'input-name': GraphQLESLintRule<{
596
+ checkInputType?: boolean | undefined;
597
+ caseSensitiveInputType?: boolean | undefined;
598
+ checkQueries?: boolean | undefined;
599
+ checkMutations?: boolean | undefined;
600
+ }[]>;
601
+ 'lone-executable-definition': GraphQLESLintRule<{
602
+ ignore?: ("fragment" | graphql.OperationTypeNode)[] | undefined;
603
+ }[]>;
604
+ 'match-document-filename': GraphQLESLintRule<{
605
+ fragment?: (CaseStyle | "matchDocumentStyle") | {
606
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
607
+ suffix?: string | undefined;
608
+ prefix?: string | undefined;
609
+ } | undefined;
610
+ fileExtension?: ".gql" | ".graphql" | undefined;
611
+ query?: (CaseStyle | "matchDocumentStyle") | {
612
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
613
+ suffix?: string | undefined;
614
+ prefix?: string | undefined;
615
+ } | undefined;
616
+ mutation?: (CaseStyle | "matchDocumentStyle") | {
617
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
618
+ suffix?: string | undefined;
619
+ prefix?: string | undefined;
620
+ } | undefined;
621
+ subscription?: (CaseStyle | "matchDocumentStyle") | {
622
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
623
+ suffix?: string | undefined;
624
+ prefix?: string | undefined;
625
+ } | undefined;
626
+ }[]>;
627
+ 'naming-convention': GraphQLESLintRule<{
628
+ [x: string]: unknown;
629
+ allowLeadingUnderscore?: boolean | undefined;
630
+ allowTrailingUnderscore?: boolean | undefined;
631
+ types?: ("camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE") | {
632
+ style?: ("camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE") | undefined;
633
+ suffix?: string | undefined;
634
+ prefix?: string | undefined;
635
+ forbiddenPatterns?: {
636
+ [x: string]: unknown;
637
+ }[] | undefined;
638
+ requiredPattern?: {
639
+ [x: string]: unknown;
640
+ } | undefined;
641
+ forbiddenPrefixes?: string[] | undefined;
642
+ forbiddenSuffixes?: string[] | undefined;
643
+ requiredPrefixes?: string[] | undefined;
644
+ requiredSuffixes?: string[] | undefined;
645
+ ignorePattern?: string | undefined;
646
+ } | undefined;
647
+ }[]>;
648
+ 'no-anonymous-operations': GraphQLESLintRule;
649
+ 'no-deprecated': GraphQLESLintRule<[], true>;
650
+ 'no-duplicate-fields': GraphQLESLintRule;
651
+ 'no-hashtag-description': GraphQLESLintRule;
652
+ 'no-one-place-fragments': GraphQLESLintRule;
653
+ 'no-root-type': GraphQLESLintRule<{
654
+ disallow: ("mutation" | "subscription")[];
655
+ }[]>;
656
+ 'no-scalar-result-type-on-mutation': GraphQLESLintRule;
657
+ 'no-typename-prefix': GraphQLESLintRule;
658
+ 'no-unreachable-types': GraphQLESLintRule;
659
+ 'no-unused-fields': GraphQLESLintRule<{
660
+ ignoredFieldSelectors?: string[] | undefined;
661
+ }[]>;
662
+ 'relay-arguments': GraphQLESLintRule<{
663
+ includeBoth: boolean;
664
+ }[], true>;
665
+ 'relay-connection-types': GraphQLESLintRule;
666
+ 'relay-edge-types': GraphQLESLintRule<{
667
+ withEdgeSuffix?: boolean | undefined;
668
+ shouldImplementNode?: boolean | undefined;
669
+ listTypeCanWrapOnlyEdgeType?: boolean | undefined;
670
+ }[], true>;
671
+ 'relay-page-info': GraphQLESLintRule;
672
+ 'require-deprecation-date': GraphQLESLintRule<{
673
+ argumentName?: string | undefined;
674
+ }[]>;
675
+ 'require-deprecation-reason': GraphQLESLintRule;
676
+ 'require-description': GraphQLESLintRule<{
677
+ OperationDefinition?: boolean | undefined;
678
+ ScalarTypeDefinition?: boolean | undefined;
679
+ ObjectTypeDefinition?: boolean | undefined;
680
+ FieldDefinition?: boolean | undefined;
681
+ InputValueDefinition?: boolean | undefined;
682
+ InterfaceTypeDefinition?: boolean | undefined;
683
+ UnionTypeDefinition?: boolean | undefined;
684
+ EnumTypeDefinition?: boolean | undefined;
685
+ EnumValueDefinition?: boolean | undefined;
686
+ InputObjectTypeDefinition?: boolean | undefined;
687
+ DirectiveDefinition?: boolean | undefined;
688
+ types?: true | undefined;
689
+ rootField?: true | undefined;
690
+ ignoredSelectors?: string[] | undefined;
691
+ }[]>;
692
+ 'require-field-of-type-query-in-mutation-result': GraphQLESLintRule;
693
+ 'require-import-fragment': GraphQLESLintRule;
694
+ 'require-nullable-fields-with-oneof': GraphQLESLintRule;
695
+ 'require-nullable-result-in-root': GraphQLESLintRule;
696
+ 'require-selections': GraphQLESLintRule<{
697
+ requireAllFields?: boolean | undefined;
698
+ fieldName: string | string[];
699
+ }[], true>;
700
+ 'require-type-pattern-with-oneof': GraphQLESLintRule;
701
+ 'selection-set-depth': GraphQLESLintRule<{
702
+ ignore?: string[] | undefined;
703
+ maxDepth: number;
704
+ }[]>;
705
+ 'strict-id-in-types': GraphQLESLintRule<{
706
+ acceptedIdNames?: string[] | undefined;
707
+ acceptedIdTypes?: string[] | undefined;
708
+ exceptions?: {
709
+ types?: string[] | undefined;
710
+ suffixes?: string[] | undefined;
711
+ } | undefined;
712
+ }[]>;
713
+ 'unique-enum-value-names': GraphQLESLintRule;
714
+ 'unique-fragment-name': GraphQLESLintRule;
715
+ 'unique-operation-name': GraphQLESLintRule;
716
+ };
717
+
718
+ declare const processors: {
719
+ graphql: {
720
+ meta: {
721
+ name: string;
722
+ version: string | undefined;
723
+ };
724
+ supportsAutofix: true;
725
+ preprocess(code: string, filePath: string): (string | Block)[];
726
+ postprocess(messages: eslint.Linter.LintMessage[][], filePath: string): eslint.Linter.LintMessage[];
727
+ };
728
+ };
729
+
730
+ declare const _default: {
731
+ parser: {
732
+ parseForESLint: typeof parseForESLint;
733
+ meta: {
734
+ name: string;
735
+ version: string | undefined;
736
+ };
737
+ };
738
+ processor: {
739
+ meta: {
740
+ name: string;
741
+ version: string | undefined;
742
+ };
743
+ supportsAutofix: true;
744
+ preprocess(code: string, filePath: string): (string | Block)[];
745
+ postprocess(messages: eslint.Linter.LintMessage[][], filePath: string): eslint.Linter.LintMessage[];
746
+ };
747
+ rules: {
748
+ alphabetize: GraphQLESLintRule<{
749
+ values?: boolean | undefined;
750
+ definitions?: boolean | undefined;
751
+ fields?: ("InputObjectTypeDefinition" | "InterfaceTypeDefinition" | "ObjectTypeDefinition")[] | undefined;
752
+ selections?: ("FragmentDefinition" | "OperationDefinition")[] | undefined;
753
+ variables?: boolean | undefined;
754
+ arguments?: ("Directive" | "DirectiveDefinition" | "Field" | "FieldDefinition")[] | undefined;
755
+ groups?: string[] | undefined;
756
+ }[]>;
757
+ 'description-style': GraphQLESLintRule<{
758
+ style: "block" | "inline";
759
+ }[]>;
760
+ 'input-name': GraphQLESLintRule<{
761
+ checkInputType?: boolean | undefined;
762
+ caseSensitiveInputType?: boolean | undefined;
763
+ checkQueries?: boolean | undefined;
764
+ checkMutations?: boolean | undefined;
765
+ }[]>;
766
+ 'lone-executable-definition': GraphQLESLintRule<{
767
+ ignore?: ("fragment" | graphql.OperationTypeNode)[] | undefined;
768
+ }[]>;
769
+ 'match-document-filename': GraphQLESLintRule<{
770
+ fragment?: (CaseStyle | "matchDocumentStyle") | {
771
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
772
+ suffix?: string | undefined;
773
+ prefix?: string | undefined;
774
+ } | undefined;
775
+ fileExtension?: ".gql" | ".graphql" | undefined;
776
+ query?: (CaseStyle | "matchDocumentStyle") | {
777
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
778
+ suffix?: string | undefined;
779
+ prefix?: string | undefined;
780
+ } | undefined;
781
+ mutation?: (CaseStyle | "matchDocumentStyle") | {
782
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
783
+ suffix?: string | undefined;
784
+ prefix?: string | undefined;
785
+ } | undefined;
786
+ subscription?: (CaseStyle | "matchDocumentStyle") | {
787
+ style?: (CaseStyle | "matchDocumentStyle") | undefined;
788
+ suffix?: string | undefined;
789
+ prefix?: string | undefined;
790
+ } | undefined;
791
+ }[]>;
792
+ 'naming-convention': GraphQLESLintRule<{
793
+ [x: string]: unknown;
794
+ allowLeadingUnderscore?: boolean | undefined;
795
+ allowTrailingUnderscore?: boolean | undefined;
796
+ types?: ("camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE") | {
797
+ style?: ("camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE") | undefined;
798
+ suffix?: string | undefined;
799
+ prefix?: string | undefined;
800
+ forbiddenPatterns?: {
801
+ [x: string]: unknown;
802
+ }[] | undefined;
803
+ requiredPattern?: {
804
+ [x: string]: unknown;
805
+ } | undefined;
806
+ forbiddenPrefixes?: string[] | undefined;
807
+ forbiddenSuffixes?: string[] | undefined;
808
+ requiredPrefixes?: string[] | undefined;
809
+ requiredSuffixes?: string[] | undefined;
810
+ ignorePattern?: string | undefined;
811
+ } | undefined;
812
+ }[]>;
813
+ 'no-anonymous-operations': GraphQLESLintRule;
814
+ 'no-deprecated': GraphQLESLintRule<[], true>;
815
+ 'no-duplicate-fields': GraphQLESLintRule;
816
+ 'no-hashtag-description': GraphQLESLintRule;
817
+ 'no-one-place-fragments': GraphQLESLintRule;
818
+ 'no-root-type': GraphQLESLintRule<{
819
+ disallow: ("mutation" | "subscription")[];
820
+ }[]>;
821
+ 'no-scalar-result-type-on-mutation': GraphQLESLintRule;
822
+ 'no-typename-prefix': GraphQLESLintRule;
823
+ 'no-unreachable-types': GraphQLESLintRule;
824
+ 'no-unused-fields': GraphQLESLintRule<{
825
+ ignoredFieldSelectors?: string[] | undefined;
826
+ }[]>;
827
+ 'relay-arguments': GraphQLESLintRule<{
828
+ includeBoth: boolean;
829
+ }[], true>;
830
+ 'relay-connection-types': GraphQLESLintRule;
831
+ 'relay-edge-types': GraphQLESLintRule<{
832
+ withEdgeSuffix?: boolean | undefined;
833
+ shouldImplementNode?: boolean | undefined;
834
+ listTypeCanWrapOnlyEdgeType?: boolean | undefined;
835
+ }[], true>;
836
+ 'relay-page-info': GraphQLESLintRule;
837
+ 'require-deprecation-date': GraphQLESLintRule<{
838
+ argumentName?: string | undefined;
839
+ }[]>;
840
+ 'require-deprecation-reason': GraphQLESLintRule;
841
+ 'require-description': GraphQLESLintRule<{
842
+ OperationDefinition?: boolean | undefined;
843
+ ScalarTypeDefinition?: boolean | undefined;
844
+ ObjectTypeDefinition?: boolean | undefined;
845
+ FieldDefinition?: boolean | undefined;
846
+ InputValueDefinition?: boolean | undefined;
847
+ InterfaceTypeDefinition?: boolean | undefined;
848
+ UnionTypeDefinition?: boolean | undefined;
849
+ EnumTypeDefinition?: boolean | undefined;
850
+ EnumValueDefinition?: boolean | undefined;
851
+ InputObjectTypeDefinition?: boolean | undefined;
852
+ DirectiveDefinition?: boolean | undefined;
853
+ types?: true | undefined;
854
+ rootField?: true | undefined;
855
+ ignoredSelectors?: string[] | undefined;
856
+ }[]>;
857
+ 'require-field-of-type-query-in-mutation-result': GraphQLESLintRule;
858
+ 'require-import-fragment': GraphQLESLintRule;
859
+ 'require-nullable-fields-with-oneof': GraphQLESLintRule;
860
+ 'require-nullable-result-in-root': GraphQLESLintRule;
861
+ 'require-selections': GraphQLESLintRule<{
862
+ requireAllFields?: boolean | undefined;
863
+ fieldName: string | string[];
864
+ }[], true>;
865
+ 'require-type-pattern-with-oneof': GraphQLESLintRule;
866
+ 'selection-set-depth': GraphQLESLintRule<{
867
+ ignore?: string[] | undefined;
868
+ maxDepth: number;
869
+ }[]>;
870
+ 'strict-id-in-types': GraphQLESLintRule<{
871
+ acceptedIdNames?: string[] | undefined;
872
+ acceptedIdTypes?: string[] | undefined;
873
+ exceptions?: {
874
+ types?: string[] | undefined;
875
+ suffixes?: string[] | undefined;
876
+ } | undefined;
877
+ }[]>;
878
+ 'unique-enum-value-names': GraphQLESLintRule;
879
+ 'unique-fragment-name': GraphQLESLintRule;
880
+ 'unique-operation-name': GraphQLESLintRule;
881
+ };
882
+ configs: {
883
+ 'schema-recommended': {
884
+ parser: string;
885
+ plugins: string[];
886
+ rules: {
887
+ '@graphql-eslint/description-style': "error";
888
+ '@graphql-eslint/known-argument-names': "error";
889
+ '@graphql-eslint/known-directives': "error";
890
+ '@graphql-eslint/known-type-names': "error";
891
+ '@graphql-eslint/lone-schema-definition': "error";
892
+ '@graphql-eslint/naming-convention': ["error", {
893
+ types: string;
894
+ FieldDefinition: string;
895
+ InputValueDefinition: string;
896
+ Argument: string;
897
+ DirectiveDefinition: string;
898
+ EnumValueDefinition: string;
899
+ 'FieldDefinition[parent.name.value=Query]': {
900
+ forbiddenPrefixes: string[];
901
+ forbiddenSuffixes: string[];
902
+ };
903
+ 'FieldDefinition[parent.name.value=Mutation]': {
904
+ forbiddenPrefixes: string[];
905
+ forbiddenSuffixes: string[];
906
+ };
907
+ 'FieldDefinition[parent.name.value=Subscription]': {
908
+ forbiddenPrefixes: string[];
909
+ forbiddenSuffixes: string[];
910
+ };
911
+ 'EnumTypeDefinition,EnumTypeExtension': {
912
+ forbiddenPrefixes: string[];
913
+ forbiddenSuffixes: string[];
914
+ };
915
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
916
+ forbiddenPrefixes: string[];
917
+ forbiddenSuffixes: string[];
918
+ };
919
+ 'UnionTypeDefinition,UnionTypeExtension': {
920
+ forbiddenPrefixes: string[];
921
+ forbiddenSuffixes: string[];
922
+ };
923
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
924
+ forbiddenPrefixes: string[];
925
+ forbiddenSuffixes: string[];
926
+ };
927
+ }];
928
+ '@graphql-eslint/no-hashtag-description': "error";
929
+ '@graphql-eslint/no-typename-prefix': "error";
930
+ '@graphql-eslint/no-unreachable-types': "error";
931
+ '@graphql-eslint/possible-type-extension': "error";
932
+ '@graphql-eslint/provided-required-arguments': "error";
933
+ '@graphql-eslint/require-deprecation-reason': "error";
934
+ '@graphql-eslint/require-description': ["error", {
935
+ types: boolean;
936
+ DirectiveDefinition: boolean;
937
+ rootField: boolean;
938
+ }];
939
+ '@graphql-eslint/strict-id-in-types': "error";
940
+ '@graphql-eslint/unique-directive-names': "error";
941
+ '@graphql-eslint/unique-directive-names-per-location': "error";
942
+ '@graphql-eslint/unique-enum-value-names': "error";
943
+ '@graphql-eslint/unique-field-definition-names': "error";
944
+ '@graphql-eslint/unique-operation-types': "error";
945
+ '@graphql-eslint/unique-type-names': "error";
946
+ };
947
+ };
948
+ 'schema-all': {
949
+ extends: string;
950
+ rules: {
951
+ '@graphql-eslint/alphabetize': ["error", {
952
+ definitions: boolean;
953
+ fields: string[];
954
+ values: boolean;
955
+ arguments: string[];
956
+ groups: string[];
957
+ }];
958
+ '@graphql-eslint/input-name': "error";
959
+ '@graphql-eslint/no-root-type': ["error", {
960
+ disallow: string[];
961
+ }];
962
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
963
+ '@graphql-eslint/require-deprecation-date': "error";
964
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
965
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
966
+ '@graphql-eslint/require-nullable-result-in-root': "error";
967
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
968
+ };
969
+ };
970
+ 'schema-relay': {
971
+ parser: string;
972
+ plugins: string[];
973
+ rules: {
974
+ '@graphql-eslint/relay-arguments': "error";
975
+ '@graphql-eslint/relay-connection-types': "error";
976
+ '@graphql-eslint/relay-edge-types': "error";
977
+ '@graphql-eslint/relay-page-info': "error";
978
+ };
979
+ };
980
+ 'operations-recommended': {
981
+ parser: string;
982
+ plugins: string[];
983
+ rules: {
984
+ '@graphql-eslint/executable-definitions': "error";
985
+ '@graphql-eslint/fields-on-correct-type': "error";
986
+ '@graphql-eslint/fragments-on-composite-type': "error";
987
+ '@graphql-eslint/known-argument-names': "error";
988
+ '@graphql-eslint/known-directives': "error";
989
+ '@graphql-eslint/known-fragment-names': "error";
990
+ '@graphql-eslint/known-type-names': "error";
991
+ '@graphql-eslint/lone-anonymous-operation': "error";
992
+ '@graphql-eslint/naming-convention': ["error", {
993
+ VariableDefinition: string;
994
+ OperationDefinition: {
995
+ style: string;
996
+ forbiddenPrefixes: string[];
997
+ forbiddenSuffixes: string[];
998
+ };
999
+ FragmentDefinition: {
1000
+ style: string;
1001
+ forbiddenPrefixes: string[];
1002
+ forbiddenSuffixes: string[];
1003
+ };
1004
+ }];
1005
+ '@graphql-eslint/no-anonymous-operations': "error";
1006
+ '@graphql-eslint/no-deprecated': "error";
1007
+ '@graphql-eslint/no-duplicate-fields': "error";
1008
+ '@graphql-eslint/no-fragment-cycles': "error";
1009
+ '@graphql-eslint/no-undefined-variables': "error";
1010
+ '@graphql-eslint/no-unused-fragments': "error";
1011
+ '@graphql-eslint/no-unused-variables': "error";
1012
+ '@graphql-eslint/one-field-subscriptions': "error";
1013
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
1014
+ '@graphql-eslint/possible-fragment-spread': "error";
1015
+ '@graphql-eslint/provided-required-arguments': "error";
1016
+ '@graphql-eslint/require-selections': "error";
1017
+ '@graphql-eslint/scalar-leafs': "error";
1018
+ '@graphql-eslint/selection-set-depth': ["error", {
1019
+ maxDepth: number;
1020
+ }];
1021
+ '@graphql-eslint/unique-argument-names': "error";
1022
+ '@graphql-eslint/unique-directive-names-per-location': "error";
1023
+ '@graphql-eslint/unique-fragment-name': "error";
1024
+ '@graphql-eslint/unique-input-field-names': "error";
1025
+ '@graphql-eslint/unique-operation-name': "error";
1026
+ '@graphql-eslint/unique-variable-names': "error";
1027
+ '@graphql-eslint/value-literals-of-correct-type': "error";
1028
+ '@graphql-eslint/variables-are-input-types': "error";
1029
+ '@graphql-eslint/variables-in-allowed-position': "error";
1030
+ };
1031
+ };
1032
+ 'operations-all': {
1033
+ extends: string;
1034
+ rules: {
1035
+ '@graphql-eslint/alphabetize': ["error", {
1036
+ definitions: boolean;
1037
+ selections: string[];
1038
+ variables: boolean;
1039
+ arguments: string[];
1040
+ groups: string[];
1041
+ }];
1042
+ '@graphql-eslint/lone-executable-definition': "error";
1043
+ '@graphql-eslint/match-document-filename': ["error", {
1044
+ query: string;
1045
+ mutation: string;
1046
+ subscription: string;
1047
+ fragment: string;
1048
+ }];
1049
+ '@graphql-eslint/no-one-place-fragments': "error";
1050
+ '@graphql-eslint/require-import-fragment': "error";
1051
+ };
1052
+ };
1053
+ 'flat/schema-recommended': {
1054
+ rules: {
1055
+ '@graphql-eslint/description-style': "error";
1056
+ '@graphql-eslint/known-argument-names': "error";
1057
+ '@graphql-eslint/known-directives': "error";
1058
+ '@graphql-eslint/known-type-names': "error";
1059
+ '@graphql-eslint/lone-schema-definition': "error";
1060
+ '@graphql-eslint/naming-convention': ["error", {
1061
+ types: string;
1062
+ FieldDefinition: string;
1063
+ InputValueDefinition: string;
1064
+ Argument: string;
1065
+ DirectiveDefinition: string;
1066
+ EnumValueDefinition: string;
1067
+ 'FieldDefinition[parent.name.value=Query]': {
1068
+ forbiddenPrefixes: string[];
1069
+ forbiddenSuffixes: string[];
1070
+ };
1071
+ 'FieldDefinition[parent.name.value=Mutation]': {
1072
+ forbiddenPrefixes: string[];
1073
+ forbiddenSuffixes: string[];
1074
+ };
1075
+ 'FieldDefinition[parent.name.value=Subscription]': {
1076
+ forbiddenPrefixes: string[];
1077
+ forbiddenSuffixes: string[];
1078
+ };
1079
+ 'EnumTypeDefinition,EnumTypeExtension': {
1080
+ forbiddenPrefixes: string[];
1081
+ forbiddenSuffixes: string[];
1082
+ };
1083
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
1084
+ forbiddenPrefixes: string[];
1085
+ forbiddenSuffixes: string[];
1086
+ };
1087
+ 'UnionTypeDefinition,UnionTypeExtension': {
1088
+ forbiddenPrefixes: string[];
1089
+ forbiddenSuffixes: string[];
1090
+ };
1091
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
1092
+ forbiddenPrefixes: string[];
1093
+ forbiddenSuffixes: string[];
1094
+ };
1095
+ }];
1096
+ '@graphql-eslint/no-hashtag-description': "error";
1097
+ '@graphql-eslint/no-typename-prefix': "error";
1098
+ '@graphql-eslint/no-unreachable-types': "error";
1099
+ '@graphql-eslint/possible-type-extension': "error";
1100
+ '@graphql-eslint/provided-required-arguments': "error";
1101
+ '@graphql-eslint/require-deprecation-reason': "error";
1102
+ '@graphql-eslint/require-description': ["error", {
1103
+ types: boolean;
1104
+ DirectiveDefinition: boolean;
1105
+ rootField: boolean;
1106
+ }];
1107
+ '@graphql-eslint/strict-id-in-types': "error";
1108
+ '@graphql-eslint/unique-directive-names': "error";
1109
+ '@graphql-eslint/unique-directive-names-per-location': "error";
1110
+ '@graphql-eslint/unique-enum-value-names': "error";
1111
+ '@graphql-eslint/unique-field-definition-names': "error";
1112
+ '@graphql-eslint/unique-operation-types': "error";
1113
+ '@graphql-eslint/unique-type-names': "error";
1114
+ };
1115
+ };
1116
+ 'flat/schema-all': {
1117
+ rules: {
1118
+ '@graphql-eslint/alphabetize': ["error", {
1119
+ definitions: boolean;
1120
+ fields: string[];
1121
+ values: boolean;
1122
+ arguments: string[];
1123
+ groups: string[];
1124
+ }];
1125
+ '@graphql-eslint/input-name': "error";
1126
+ '@graphql-eslint/no-root-type': ["error", {
1127
+ disallow: string[];
1128
+ }];
1129
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
1130
+ '@graphql-eslint/require-deprecation-date': "error";
1131
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
1132
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
1133
+ '@graphql-eslint/require-nullable-result-in-root': "error";
1134
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
1135
+ '@graphql-eslint/description-style': "error";
1136
+ '@graphql-eslint/known-argument-names': "error";
1137
+ '@graphql-eslint/known-directives': "error";
1138
+ '@graphql-eslint/known-type-names': "error";
1139
+ '@graphql-eslint/lone-schema-definition': "error";
1140
+ '@graphql-eslint/naming-convention': ["error", {
1141
+ types: string;
1142
+ FieldDefinition: string;
1143
+ InputValueDefinition: string;
1144
+ Argument: string;
1145
+ DirectiveDefinition: string;
1146
+ EnumValueDefinition: string;
1147
+ 'FieldDefinition[parent.name.value=Query]': {
1148
+ forbiddenPrefixes: string[];
1149
+ forbiddenSuffixes: string[];
1150
+ };
1151
+ 'FieldDefinition[parent.name.value=Mutation]': {
1152
+ forbiddenPrefixes: string[];
1153
+ forbiddenSuffixes: string[];
1154
+ };
1155
+ 'FieldDefinition[parent.name.value=Subscription]': {
1156
+ forbiddenPrefixes: string[];
1157
+ forbiddenSuffixes: string[];
1158
+ };
1159
+ 'EnumTypeDefinition,EnumTypeExtension': {
1160
+ forbiddenPrefixes: string[];
1161
+ forbiddenSuffixes: string[];
1162
+ };
1163
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
1164
+ forbiddenPrefixes: string[];
1165
+ forbiddenSuffixes: string[];
1166
+ };
1167
+ 'UnionTypeDefinition,UnionTypeExtension': {
1168
+ forbiddenPrefixes: string[];
1169
+ forbiddenSuffixes: string[];
1170
+ };
1171
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
1172
+ forbiddenPrefixes: string[];
1173
+ forbiddenSuffixes: string[];
1174
+ };
1175
+ }];
1176
+ '@graphql-eslint/no-hashtag-description': "error";
1177
+ '@graphql-eslint/no-typename-prefix': "error";
1178
+ '@graphql-eslint/no-unreachable-types': "error";
1179
+ '@graphql-eslint/possible-type-extension': "error";
1180
+ '@graphql-eslint/provided-required-arguments': "error";
1181
+ '@graphql-eslint/require-deprecation-reason': "error";
1182
+ '@graphql-eslint/require-description': ["error", {
1183
+ types: boolean;
1184
+ DirectiveDefinition: boolean;
1185
+ rootField: boolean;
1186
+ }];
1187
+ '@graphql-eslint/strict-id-in-types': "error";
1188
+ '@graphql-eslint/unique-directive-names': "error";
1189
+ '@graphql-eslint/unique-directive-names-per-location': "error";
1190
+ '@graphql-eslint/unique-enum-value-names': "error";
1191
+ '@graphql-eslint/unique-field-definition-names': "error";
1192
+ '@graphql-eslint/unique-operation-types': "error";
1193
+ '@graphql-eslint/unique-type-names': "error";
1194
+ };
1195
+ };
1196
+ 'flat/schema-relay': {
1197
+ rules: {
1198
+ '@graphql-eslint/relay-arguments': "error";
1199
+ '@graphql-eslint/relay-connection-types': "error";
1200
+ '@graphql-eslint/relay-edge-types': "error";
1201
+ '@graphql-eslint/relay-page-info': "error";
1202
+ };
1203
+ };
1204
+ 'flat/operations-recommended': {
1205
+ rules: {
1206
+ '@graphql-eslint/executable-definitions': "error";
1207
+ '@graphql-eslint/fields-on-correct-type': "error";
1208
+ '@graphql-eslint/fragments-on-composite-type': "error";
1209
+ '@graphql-eslint/known-argument-names': "error";
1210
+ '@graphql-eslint/known-directives': "error";
1211
+ '@graphql-eslint/known-fragment-names': "error";
1212
+ '@graphql-eslint/known-type-names': "error";
1213
+ '@graphql-eslint/lone-anonymous-operation': "error";
1214
+ '@graphql-eslint/naming-convention': ["error", {
1215
+ VariableDefinition: string;
1216
+ OperationDefinition: {
1217
+ style: string;
1218
+ forbiddenPrefixes: string[];
1219
+ forbiddenSuffixes: string[];
1220
+ };
1221
+ FragmentDefinition: {
1222
+ style: string;
1223
+ forbiddenPrefixes: string[];
1224
+ forbiddenSuffixes: string[];
1225
+ };
1226
+ }];
1227
+ '@graphql-eslint/no-anonymous-operations': "error";
1228
+ '@graphql-eslint/no-deprecated': "error";
1229
+ '@graphql-eslint/no-duplicate-fields': "error";
1230
+ '@graphql-eslint/no-fragment-cycles': "error";
1231
+ '@graphql-eslint/no-undefined-variables': "error";
1232
+ '@graphql-eslint/no-unused-fragments': "error";
1233
+ '@graphql-eslint/no-unused-variables': "error";
1234
+ '@graphql-eslint/one-field-subscriptions': "error";
1235
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
1236
+ '@graphql-eslint/possible-fragment-spread': "error";
1237
+ '@graphql-eslint/provided-required-arguments': "error";
1238
+ '@graphql-eslint/require-selections': "error";
1239
+ '@graphql-eslint/scalar-leafs': "error";
1240
+ '@graphql-eslint/selection-set-depth': ["error", {
1241
+ maxDepth: number;
1242
+ }];
1243
+ '@graphql-eslint/unique-argument-names': "error";
1244
+ '@graphql-eslint/unique-directive-names-per-location': "error";
1245
+ '@graphql-eslint/unique-fragment-name': "error";
1246
+ '@graphql-eslint/unique-input-field-names': "error";
1247
+ '@graphql-eslint/unique-operation-name': "error";
1248
+ '@graphql-eslint/unique-variable-names': "error";
1249
+ '@graphql-eslint/value-literals-of-correct-type': "error";
1250
+ '@graphql-eslint/variables-are-input-types': "error";
1251
+ '@graphql-eslint/variables-in-allowed-position': "error";
1252
+ };
1253
+ };
1254
+ 'flat/operations-all': {
1255
+ rules: {
1256
+ '@graphql-eslint/alphabetize': ["error", {
1257
+ definitions: boolean;
1258
+ selections: string[];
1259
+ variables: boolean;
1260
+ arguments: string[];
1261
+ groups: string[];
1262
+ }];
1263
+ '@graphql-eslint/lone-executable-definition': "error";
1264
+ '@graphql-eslint/match-document-filename': ["error", {
1265
+ query: string;
1266
+ mutation: string;
1267
+ subscription: string;
1268
+ fragment: string;
1269
+ }];
1270
+ '@graphql-eslint/no-one-place-fragments': "error";
1271
+ '@graphql-eslint/require-import-fragment': "error";
1272
+ '@graphql-eslint/executable-definitions': "error";
1273
+ '@graphql-eslint/fields-on-correct-type': "error";
1274
+ '@graphql-eslint/fragments-on-composite-type': "error";
1275
+ '@graphql-eslint/known-argument-names': "error";
1276
+ '@graphql-eslint/known-directives': "error";
1277
+ '@graphql-eslint/known-fragment-names': "error";
1278
+ '@graphql-eslint/known-type-names': "error";
1279
+ '@graphql-eslint/lone-anonymous-operation': "error";
1280
+ '@graphql-eslint/naming-convention': ["error", {
1281
+ VariableDefinition: string;
1282
+ OperationDefinition: {
1283
+ style: string;
1284
+ forbiddenPrefixes: string[];
1285
+ forbiddenSuffixes: string[];
1286
+ };
1287
+ FragmentDefinition: {
1288
+ style: string;
1289
+ forbiddenPrefixes: string[];
1290
+ forbiddenSuffixes: string[];
1291
+ };
1292
+ }];
1293
+ '@graphql-eslint/no-anonymous-operations': "error";
1294
+ '@graphql-eslint/no-deprecated': "error";
1295
+ '@graphql-eslint/no-duplicate-fields': "error";
1296
+ '@graphql-eslint/no-fragment-cycles': "error";
1297
+ '@graphql-eslint/no-undefined-variables': "error";
1298
+ '@graphql-eslint/no-unused-fragments': "error";
1299
+ '@graphql-eslint/no-unused-variables': "error";
1300
+ '@graphql-eslint/one-field-subscriptions': "error";
1301
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
1302
+ '@graphql-eslint/possible-fragment-spread': "error";
1303
+ '@graphql-eslint/provided-required-arguments': "error";
1304
+ '@graphql-eslint/require-selections': "error";
1305
+ '@graphql-eslint/scalar-leafs': "error";
1306
+ '@graphql-eslint/selection-set-depth': ["error", {
1307
+ maxDepth: number;
1308
+ }];
1309
+ '@graphql-eslint/unique-argument-names': "error";
1310
+ '@graphql-eslint/unique-directive-names-per-location': "error";
1311
+ '@graphql-eslint/unique-fragment-name': "error";
1312
+ '@graphql-eslint/unique-input-field-names': "error";
1313
+ '@graphql-eslint/unique-operation-name': "error";
1314
+ '@graphql-eslint/unique-variable-names': "error";
1315
+ '@graphql-eslint/value-literals-of-correct-type': "error";
1316
+ '@graphql-eslint/variables-are-input-types': "error";
1317
+ '@graphql-eslint/variables-in-allowed-position': "error";
1318
+ };
1319
+ };
1320
+ };
1321
+ };
1322
+
1323
+ export { type CategoryType, type ConfigName, type GraphQLESLintParseResult, type GraphQLESLintRule, type GraphQLESLintRuleContext, type GraphQLESLintRuleListener, type GraphQLESTreeNode, type OmitRecursively, type ParserOptions, type ParserServices, type Pointer, type ReportDescriptor, type RuleDocsInfo, type Schema, type ValueOf, configs, _default as default, parseForESLint, parser, processors, requireGraphQLOperations, requireGraphQLSchema, rules };