@graphql-eslint/eslint-plugin 4.0.0-alpha.15 → 4.0.0-alpha.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. package/cjs/cache.js +1 -2
  2. package/cjs/configs/index.d.cts +427 -10
  3. package/cjs/configs/index.js +1 -2
  4. package/cjs/configs/operations-all.d.cts +8 -8
  5. package/cjs/configs/operations-all.js +30 -33
  6. package/cjs/configs/operations-recommended.d.cts +35 -35
  7. package/cjs/configs/operations-recommended.js +56 -59
  8. package/cjs/configs/schema-all.d.cts +12 -12
  9. package/cjs/configs/schema-all.js +26 -29
  10. package/cjs/configs/schema-recommended.d.cts +23 -23
  11. package/cjs/configs/schema-recommended.js +70 -73
  12. package/cjs/configs/schema-relay.d.cts +5 -5
  13. package/cjs/configs/schema-relay.js +14 -17
  14. package/cjs/documents.js +1 -2
  15. package/cjs/estree-converter/converter.js +1 -2
  16. package/cjs/estree-converter/utils.js +1 -2
  17. package/cjs/graphql-config.js +1 -2
  18. package/cjs/index.d.cts +433 -15
  19. package/cjs/index.js +1 -2
  20. package/cjs/meta.js +1 -2
  21. package/cjs/parser.js +1 -2
  22. package/cjs/processor.js +1 -2
  23. package/cjs/rules/alphabetize/index.js +1 -2
  24. package/cjs/rules/description-style/index.js +1 -2
  25. package/cjs/rules/graphql-js-validation.js +1 -2
  26. package/cjs/rules/index.d.cts +4 -4
  27. package/cjs/rules/index.js +1 -2
  28. package/cjs/rules/input-name/index.js +1 -2
  29. package/cjs/rules/lone-executable-definition/index.js +1 -2
  30. package/cjs/rules/match-document-filename/index.js +1 -2
  31. package/cjs/rules/naming-convention/index.js +1 -2
  32. package/cjs/rules/no-anonymous-operations/index.js +1 -2
  33. package/cjs/rules/no-deprecated/index.js +1 -2
  34. package/cjs/rules/no-duplicate-fields/index.js +1 -2
  35. package/cjs/rules/no-hashtag-description/index.js +1 -2
  36. package/cjs/rules/no-one-place-fragments/index.js +1 -2
  37. package/cjs/rules/no-root-type/index.js +1 -2
  38. package/cjs/rules/no-scalar-result-type-on-mutation/index.js +1 -2
  39. package/cjs/rules/no-typename-prefix/index.js +1 -2
  40. package/cjs/rules/no-unreachable-types/index.js +1 -2
  41. package/cjs/rules/no-unused-fields/index.js +1 -2
  42. package/cjs/rules/relay-arguments/index.js +1 -2
  43. package/cjs/rules/relay-connection-types/index.js +1 -2
  44. package/cjs/rules/relay-edge-types/index.js +1 -2
  45. package/cjs/rules/relay-page-info/index.js +1 -2
  46. package/cjs/rules/require-deprecation-date/index.js +1 -2
  47. package/cjs/rules/require-deprecation-reason/index.js +1 -2
  48. package/cjs/rules/require-description/index.js +1 -2
  49. package/cjs/rules/require-field-of-type-query-in-mutation-result/index.js +1 -2
  50. package/cjs/rules/require-import-fragment/index.js +1 -2
  51. package/cjs/rules/require-nullable-fields-with-oneof/index.js +1 -2
  52. package/cjs/rules/require-nullable-result-in-root/index.js +1 -2
  53. package/cjs/rules/require-selections/index.js +1 -2
  54. package/cjs/rules/require-type-pattern-with-oneof/index.js +1 -2
  55. package/cjs/rules/selection-set-depth/index.js +1 -2
  56. package/cjs/rules/strict-id-in-types/index.js +1 -2
  57. package/cjs/rules/unique-enum-value-names/index.js +1 -2
  58. package/cjs/rules/unique-fragment-name/index.js +1 -2
  59. package/cjs/rules/unique-operation-name/index.js +1 -2
  60. package/cjs/schema.js +1 -2
  61. package/cjs/siblings.js +1 -2
  62. package/cjs/utils.js +1 -2
  63. package/esm/cache.js +0 -1
  64. package/esm/configs/index.d.ts +427 -10
  65. package/esm/configs/index.js +0 -1
  66. package/esm/configs/operations-all.d.ts +7 -7
  67. package/esm/configs/operations-all.js +28 -33
  68. package/esm/configs/operations-recommended.d.ts +34 -34
  69. package/esm/configs/operations-recommended.js +54 -59
  70. package/esm/configs/schema-all.d.ts +11 -11
  71. package/esm/configs/schema-all.js +24 -29
  72. package/esm/configs/schema-recommended.d.ts +22 -22
  73. package/esm/configs/schema-recommended.js +68 -73
  74. package/esm/configs/schema-relay.d.ts +4 -4
  75. package/esm/configs/schema-relay.js +12 -17
  76. package/esm/documents.js +0 -1
  77. package/esm/estree-converter/converter.js +0 -1
  78. package/esm/estree-converter/utils.js +0 -1
  79. package/esm/graphql-config.js +0 -1
  80. package/esm/index.d.ts +433 -15
  81. package/esm/index.js +0 -1
  82. package/esm/meta.js +1 -2
  83. package/esm/parser.js +0 -1
  84. package/esm/processor.js +0 -1
  85. package/esm/rules/alphabetize/index.js +0 -1
  86. package/esm/rules/description-style/index.js +0 -1
  87. package/esm/rules/graphql-js-validation.js +0 -1
  88. package/esm/rules/index.d.ts +4 -4
  89. package/esm/rules/index.js +0 -1
  90. package/esm/rules/input-name/index.js +0 -1
  91. package/esm/rules/lone-executable-definition/index.js +0 -1
  92. package/esm/rules/match-document-filename/index.js +0 -1
  93. package/esm/rules/naming-convention/index.js +0 -1
  94. package/esm/rules/no-anonymous-operations/index.js +0 -1
  95. package/esm/rules/no-deprecated/index.js +0 -1
  96. package/esm/rules/no-duplicate-fields/index.js +0 -1
  97. package/esm/rules/no-hashtag-description/index.js +0 -1
  98. package/esm/rules/no-one-place-fragments/index.js +0 -1
  99. package/esm/rules/no-root-type/index.js +0 -1
  100. package/esm/rules/no-scalar-result-type-on-mutation/index.js +0 -1
  101. package/esm/rules/no-typename-prefix/index.js +0 -1
  102. package/esm/rules/no-unreachable-types/index.js +0 -1
  103. package/esm/rules/no-unused-fields/index.js +0 -1
  104. package/esm/rules/relay-arguments/index.js +0 -1
  105. package/esm/rules/relay-connection-types/index.js +0 -1
  106. package/esm/rules/relay-edge-types/index.js +0 -1
  107. package/esm/rules/relay-page-info/index.js +0 -1
  108. package/esm/rules/require-deprecation-date/index.js +0 -1
  109. package/esm/rules/require-deprecation-reason/index.js +0 -1
  110. package/esm/rules/require-description/index.js +0 -1
  111. package/esm/rules/require-field-of-type-query-in-mutation-result/index.js +0 -1
  112. package/esm/rules/require-import-fragment/index.js +0 -1
  113. package/esm/rules/require-nullable-fields-with-oneof/index.js +0 -1
  114. package/esm/rules/require-nullable-result-in-root/index.js +0 -1
  115. package/esm/rules/require-selections/index.js +0 -1
  116. package/esm/rules/require-type-pattern-with-oneof/index.js +0 -1
  117. package/esm/rules/selection-set-depth/index.js +0 -1
  118. package/esm/rules/strict-id-in-types/index.js +0 -1
  119. package/esm/rules/unique-enum-value-names/index.js +0 -1
  120. package/esm/rules/unique-fragment-name/index.js +0 -1
  121. package/esm/rules/unique-operation-name/index.js +0 -1
  122. package/esm/schema.js +0 -1
  123. package/esm/siblings.js +0 -1
  124. package/esm/utils.js +0 -1
  125. package/index.browser.js +203 -251
  126. package/package.json +1 -1
  127. package/cjs/chunk-UIAXBAMD.js +0 -8
  128. package/esm/chunk-UIAXBAMD.js +0 -8
package/esm/index.d.ts CHANGED
@@ -10,11 +10,12 @@ export { configs } from './configs/index.js';
10
10
  import { parseForESLint } from './parser.js';
11
11
  export { parser } from './parser.js';
12
12
  export { rules } from './rules/index.js';
13
+ export { IGraphQLConfig } from 'graphql-config';
14
+ export { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck';
13
15
  export { GraphQLESTreeNode } from './estree-converter/types.js';
14
16
  import 'estree';
15
17
  import './siblings.js';
16
18
  import '@graphql-tools/utils';
17
- import 'graphql-config';
18
19
  import 'json-schema-to-ts';
19
20
 
20
21
  declare const processors: {
@@ -48,10 +49,10 @@ declare const _default: {
48
49
  };
49
50
  rules: {
50
51
  alphabetize: GraphQLESLintRule<{
52
+ values?: boolean | undefined;
51
53
  definitions?: boolean | undefined;
52
54
  selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined;
53
55
  arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined;
54
- values?: boolean | undefined;
55
56
  fields?: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[] | undefined;
56
57
  variables?: boolean | undefined;
57
58
  groups?: string[] | undefined;
@@ -74,17 +75,17 @@ declare const _default: {
74
75
  suffix?: string | undefined;
75
76
  prefix?: string | undefined;
76
77
  } | undefined;
77
- mutation?: (CaseStyle | "matchDocumentStyle") | {
78
+ query?: (CaseStyle | "matchDocumentStyle") | {
78
79
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
79
80
  suffix?: string | undefined;
80
81
  prefix?: string | undefined;
81
82
  } | undefined;
82
- subscription?: (CaseStyle | "matchDocumentStyle") | {
83
+ mutation?: (CaseStyle | "matchDocumentStyle") | {
83
84
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
84
85
  suffix?: string | undefined;
85
86
  prefix?: string | undefined;
86
87
  } | undefined;
87
- query?: (CaseStyle | "matchDocumentStyle") | {
88
+ subscription?: (CaseStyle | "matchDocumentStyle") | {
88
89
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
89
90
  suffix?: string | undefined;
90
91
  prefix?: string | undefined;
@@ -160,25 +161,442 @@ declare const _default: {
160
161
  'unique-operation-name': GraphQLESLintRule;
161
162
  };
162
163
  configs: {
163
- 'schema-recommended': any;
164
- 'schema-all': any;
165
- 'schema-relay': any;
166
- 'operations-recommended': any;
167
- 'operations-all': any;
164
+ 'schema-recommended': {
165
+ parser: string;
166
+ plugins: string[];
167
+ rules: {
168
+ '@graphql-eslint/description-style': "error";
169
+ '@graphql-eslint/known-argument-names': "error";
170
+ '@graphql-eslint/known-directives': "error";
171
+ '@graphql-eslint/known-type-names': "error";
172
+ '@graphql-eslint/lone-schema-definition': "error";
173
+ '@graphql-eslint/naming-convention': ["error", {
174
+ types: string;
175
+ FieldDefinition: string;
176
+ InputValueDefinition: string;
177
+ Argument: string;
178
+ DirectiveDefinition: string;
179
+ EnumValueDefinition: string;
180
+ 'FieldDefinition[parent.name.value=Query]': {
181
+ forbiddenPrefixes: string[];
182
+ forbiddenSuffixes: string[];
183
+ };
184
+ 'FieldDefinition[parent.name.value=Mutation]': {
185
+ forbiddenPrefixes: string[];
186
+ forbiddenSuffixes: string[];
187
+ };
188
+ 'FieldDefinition[parent.name.value=Subscription]': {
189
+ forbiddenPrefixes: string[];
190
+ forbiddenSuffixes: string[];
191
+ };
192
+ 'EnumTypeDefinition,EnumTypeExtension': {
193
+ forbiddenPrefixes: string[];
194
+ forbiddenSuffixes: string[];
195
+ };
196
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
197
+ forbiddenPrefixes: string[];
198
+ forbiddenSuffixes: string[];
199
+ };
200
+ 'UnionTypeDefinition,UnionTypeExtension': {
201
+ forbiddenPrefixes: string[];
202
+ forbiddenSuffixes: string[];
203
+ };
204
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
205
+ forbiddenPrefixes: string[];
206
+ forbiddenSuffixes: string[];
207
+ };
208
+ }];
209
+ '@graphql-eslint/no-hashtag-description': "error";
210
+ '@graphql-eslint/no-typename-prefix': "error";
211
+ '@graphql-eslint/no-unreachable-types': "error";
212
+ '@graphql-eslint/possible-type-extension': "error";
213
+ '@graphql-eslint/provided-required-arguments': "error";
214
+ '@graphql-eslint/require-deprecation-reason': "error";
215
+ '@graphql-eslint/require-description': ["error", {
216
+ types: boolean;
217
+ DirectiveDefinition: boolean;
218
+ rootField: boolean;
219
+ }];
220
+ '@graphql-eslint/strict-id-in-types': "error";
221
+ '@graphql-eslint/unique-directive-names': "error";
222
+ '@graphql-eslint/unique-directive-names-per-location': "error";
223
+ '@graphql-eslint/unique-enum-value-names': "error";
224
+ '@graphql-eslint/unique-field-definition-names': "error";
225
+ '@graphql-eslint/unique-operation-types': "error";
226
+ '@graphql-eslint/unique-type-names': "error";
227
+ };
228
+ };
229
+ 'schema-all': {
230
+ extends: string;
231
+ rules: {
232
+ '@graphql-eslint/alphabetize': ["error", {
233
+ definitions: boolean;
234
+ fields: string[];
235
+ values: boolean;
236
+ arguments: string[];
237
+ groups: string[];
238
+ }];
239
+ '@graphql-eslint/input-name': "error";
240
+ '@graphql-eslint/no-root-type': ["error", {
241
+ disallow: string[];
242
+ }];
243
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
244
+ '@graphql-eslint/require-deprecation-date': "error";
245
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
246
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
247
+ '@graphql-eslint/require-nullable-result-in-root': "error";
248
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
249
+ };
250
+ };
251
+ 'schema-relay': {
252
+ parser: string;
253
+ plugins: string[];
254
+ rules: {
255
+ '@graphql-eslint/relay-arguments': "error";
256
+ '@graphql-eslint/relay-connection-types': "error";
257
+ '@graphql-eslint/relay-edge-types': "error";
258
+ '@graphql-eslint/relay-page-info': "error";
259
+ };
260
+ };
261
+ 'operations-recommended': {
262
+ parser: string;
263
+ plugins: string[];
264
+ rules: {
265
+ '@graphql-eslint/executable-definitions': "error";
266
+ '@graphql-eslint/fields-on-correct-type': "error";
267
+ '@graphql-eslint/fragments-on-composite-type': "error";
268
+ '@graphql-eslint/known-argument-names': "error";
269
+ '@graphql-eslint/known-directives': "error";
270
+ '@graphql-eslint/known-fragment-names': "error";
271
+ '@graphql-eslint/known-type-names': "error";
272
+ '@graphql-eslint/lone-anonymous-operation': "error";
273
+ '@graphql-eslint/naming-convention': ["error", {
274
+ VariableDefinition: string;
275
+ OperationDefinition: {
276
+ style: string;
277
+ forbiddenPrefixes: string[];
278
+ forbiddenSuffixes: string[];
279
+ };
280
+ FragmentDefinition: {
281
+ style: string;
282
+ forbiddenPrefixes: string[];
283
+ forbiddenSuffixes: string[];
284
+ };
285
+ }];
286
+ '@graphql-eslint/no-anonymous-operations': "error";
287
+ '@graphql-eslint/no-deprecated': "error";
288
+ '@graphql-eslint/no-duplicate-fields': "error";
289
+ '@graphql-eslint/no-fragment-cycles': "error";
290
+ '@graphql-eslint/no-undefined-variables': "error";
291
+ '@graphql-eslint/no-unused-fragments': "error";
292
+ '@graphql-eslint/no-unused-variables': "error";
293
+ '@graphql-eslint/one-field-subscriptions': "error";
294
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
295
+ '@graphql-eslint/possible-fragment-spread': "error";
296
+ '@graphql-eslint/provided-required-arguments': "error";
297
+ '@graphql-eslint/require-selections': "error";
298
+ '@graphql-eslint/scalar-leafs': "error";
299
+ '@graphql-eslint/selection-set-depth': ["error", {
300
+ maxDepth: number;
301
+ }];
302
+ '@graphql-eslint/unique-argument-names': "error";
303
+ '@graphql-eslint/unique-directive-names-per-location': "error";
304
+ '@graphql-eslint/unique-fragment-name': "error";
305
+ '@graphql-eslint/unique-input-field-names': "error";
306
+ '@graphql-eslint/unique-operation-name': "error";
307
+ '@graphql-eslint/unique-variable-names': "error";
308
+ '@graphql-eslint/value-literals-of-correct-type': "error";
309
+ '@graphql-eslint/variables-are-input-types': "error";
310
+ '@graphql-eslint/variables-in-allowed-position': "error";
311
+ };
312
+ };
313
+ 'operations-all': {
314
+ extends: string;
315
+ rules: {
316
+ '@graphql-eslint/alphabetize': ["error", {
317
+ definitions: boolean;
318
+ selections: string[];
319
+ variables: boolean;
320
+ arguments: string[];
321
+ groups: string[];
322
+ }];
323
+ '@graphql-eslint/lone-executable-definition': "error";
324
+ '@graphql-eslint/match-document-filename': ["error", {
325
+ query: string;
326
+ mutation: string;
327
+ subscription: string;
328
+ fragment: string;
329
+ }];
330
+ '@graphql-eslint/no-one-place-fragments': "error";
331
+ '@graphql-eslint/require-import-fragment': "error";
332
+ };
333
+ };
168
334
  'flat/schema-recommended': {
169
- rules: any;
335
+ rules: {
336
+ '@graphql-eslint/description-style': "error";
337
+ '@graphql-eslint/known-argument-names': "error";
338
+ '@graphql-eslint/known-directives': "error";
339
+ '@graphql-eslint/known-type-names': "error";
340
+ '@graphql-eslint/lone-schema-definition': "error";
341
+ '@graphql-eslint/naming-convention': ["error", {
342
+ types: string;
343
+ FieldDefinition: string;
344
+ InputValueDefinition: string;
345
+ Argument: string;
346
+ DirectiveDefinition: string;
347
+ EnumValueDefinition: string;
348
+ 'FieldDefinition[parent.name.value=Query]': {
349
+ forbiddenPrefixes: string[];
350
+ forbiddenSuffixes: string[];
351
+ };
352
+ 'FieldDefinition[parent.name.value=Mutation]': {
353
+ forbiddenPrefixes: string[];
354
+ forbiddenSuffixes: string[];
355
+ };
356
+ 'FieldDefinition[parent.name.value=Subscription]': {
357
+ forbiddenPrefixes: string[];
358
+ forbiddenSuffixes: string[];
359
+ };
360
+ 'EnumTypeDefinition,EnumTypeExtension': {
361
+ forbiddenPrefixes: string[];
362
+ forbiddenSuffixes: string[];
363
+ };
364
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
365
+ forbiddenPrefixes: string[];
366
+ forbiddenSuffixes: string[];
367
+ };
368
+ 'UnionTypeDefinition,UnionTypeExtension': {
369
+ forbiddenPrefixes: string[];
370
+ forbiddenSuffixes: string[];
371
+ };
372
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
373
+ forbiddenPrefixes: string[];
374
+ forbiddenSuffixes: string[];
375
+ };
376
+ }];
377
+ '@graphql-eslint/no-hashtag-description': "error";
378
+ '@graphql-eslint/no-typename-prefix': "error";
379
+ '@graphql-eslint/no-unreachable-types': "error";
380
+ '@graphql-eslint/possible-type-extension': "error";
381
+ '@graphql-eslint/provided-required-arguments': "error";
382
+ '@graphql-eslint/require-deprecation-reason': "error";
383
+ '@graphql-eslint/require-description': ["error", {
384
+ types: boolean;
385
+ DirectiveDefinition: boolean;
386
+ rootField: boolean;
387
+ }];
388
+ '@graphql-eslint/strict-id-in-types': "error";
389
+ '@graphql-eslint/unique-directive-names': "error";
390
+ '@graphql-eslint/unique-directive-names-per-location': "error";
391
+ '@graphql-eslint/unique-enum-value-names': "error";
392
+ '@graphql-eslint/unique-field-definition-names': "error";
393
+ '@graphql-eslint/unique-operation-types': "error";
394
+ '@graphql-eslint/unique-type-names': "error";
395
+ };
170
396
  };
171
397
  'flat/schema-all': {
172
- rules: any;
398
+ rules: {
399
+ '@graphql-eslint/alphabetize': ["error", {
400
+ definitions: boolean;
401
+ fields: string[];
402
+ values: boolean;
403
+ arguments: string[];
404
+ groups: string[];
405
+ }];
406
+ '@graphql-eslint/input-name': "error";
407
+ '@graphql-eslint/no-root-type': ["error", {
408
+ disallow: string[];
409
+ }];
410
+ '@graphql-eslint/no-scalar-result-type-on-mutation': "error";
411
+ '@graphql-eslint/require-deprecation-date': "error";
412
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
413
+ '@graphql-eslint/require-nullable-fields-with-oneof': "error";
414
+ '@graphql-eslint/require-nullable-result-in-root': "error";
415
+ '@graphql-eslint/require-type-pattern-with-oneof': "error";
416
+ '@graphql-eslint/description-style': "error";
417
+ '@graphql-eslint/known-argument-names': "error";
418
+ '@graphql-eslint/known-directives': "error";
419
+ '@graphql-eslint/known-type-names': "error";
420
+ '@graphql-eslint/lone-schema-definition': "error";
421
+ '@graphql-eslint/naming-convention': ["error", {
422
+ types: string;
423
+ FieldDefinition: string;
424
+ InputValueDefinition: string;
425
+ Argument: string;
426
+ DirectiveDefinition: string;
427
+ EnumValueDefinition: string;
428
+ 'FieldDefinition[parent.name.value=Query]': {
429
+ forbiddenPrefixes: string[];
430
+ forbiddenSuffixes: string[];
431
+ };
432
+ 'FieldDefinition[parent.name.value=Mutation]': {
433
+ forbiddenPrefixes: string[];
434
+ forbiddenSuffixes: string[];
435
+ };
436
+ 'FieldDefinition[parent.name.value=Subscription]': {
437
+ forbiddenPrefixes: string[];
438
+ forbiddenSuffixes: string[];
439
+ };
440
+ 'EnumTypeDefinition,EnumTypeExtension': {
441
+ forbiddenPrefixes: string[];
442
+ forbiddenSuffixes: string[];
443
+ };
444
+ 'InterfaceTypeDefinition,InterfaceTypeExtension': {
445
+ forbiddenPrefixes: string[];
446
+ forbiddenSuffixes: string[];
447
+ };
448
+ 'UnionTypeDefinition,UnionTypeExtension': {
449
+ forbiddenPrefixes: string[];
450
+ forbiddenSuffixes: string[];
451
+ };
452
+ 'ObjectTypeDefinition,ObjectTypeExtension': {
453
+ forbiddenPrefixes: string[];
454
+ forbiddenSuffixes: string[];
455
+ };
456
+ }];
457
+ '@graphql-eslint/no-hashtag-description': "error";
458
+ '@graphql-eslint/no-typename-prefix': "error";
459
+ '@graphql-eslint/no-unreachable-types': "error";
460
+ '@graphql-eslint/possible-type-extension': "error";
461
+ '@graphql-eslint/provided-required-arguments': "error";
462
+ '@graphql-eslint/require-deprecation-reason': "error";
463
+ '@graphql-eslint/require-description': ["error", {
464
+ types: boolean;
465
+ DirectiveDefinition: boolean;
466
+ rootField: boolean;
467
+ }];
468
+ '@graphql-eslint/strict-id-in-types': "error";
469
+ '@graphql-eslint/unique-directive-names': "error";
470
+ '@graphql-eslint/unique-directive-names-per-location': "error";
471
+ '@graphql-eslint/unique-enum-value-names': "error";
472
+ '@graphql-eslint/unique-field-definition-names': "error";
473
+ '@graphql-eslint/unique-operation-types': "error";
474
+ '@graphql-eslint/unique-type-names': "error";
475
+ };
173
476
  };
174
477
  'flat/schema-relay': {
175
- rules: any;
478
+ rules: {
479
+ '@graphql-eslint/relay-arguments': "error";
480
+ '@graphql-eslint/relay-connection-types': "error";
481
+ '@graphql-eslint/relay-edge-types': "error";
482
+ '@graphql-eslint/relay-page-info': "error";
483
+ };
176
484
  };
177
485
  'flat/operations-recommended': {
178
- rules: any;
486
+ rules: {
487
+ '@graphql-eslint/executable-definitions': "error";
488
+ '@graphql-eslint/fields-on-correct-type': "error";
489
+ '@graphql-eslint/fragments-on-composite-type': "error";
490
+ '@graphql-eslint/known-argument-names': "error";
491
+ '@graphql-eslint/known-directives': "error";
492
+ '@graphql-eslint/known-fragment-names': "error";
493
+ '@graphql-eslint/known-type-names': "error";
494
+ '@graphql-eslint/lone-anonymous-operation': "error";
495
+ '@graphql-eslint/naming-convention': ["error", {
496
+ VariableDefinition: string;
497
+ OperationDefinition: {
498
+ style: string;
499
+ forbiddenPrefixes: string[];
500
+ forbiddenSuffixes: string[];
501
+ };
502
+ FragmentDefinition: {
503
+ style: string;
504
+ forbiddenPrefixes: string[];
505
+ forbiddenSuffixes: string[];
506
+ };
507
+ }];
508
+ '@graphql-eslint/no-anonymous-operations': "error";
509
+ '@graphql-eslint/no-deprecated': "error";
510
+ '@graphql-eslint/no-duplicate-fields': "error";
511
+ '@graphql-eslint/no-fragment-cycles': "error";
512
+ '@graphql-eslint/no-undefined-variables': "error";
513
+ '@graphql-eslint/no-unused-fragments': "error";
514
+ '@graphql-eslint/no-unused-variables': "error";
515
+ '@graphql-eslint/one-field-subscriptions': "error";
516
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
517
+ '@graphql-eslint/possible-fragment-spread': "error";
518
+ '@graphql-eslint/provided-required-arguments': "error";
519
+ '@graphql-eslint/require-selections': "error";
520
+ '@graphql-eslint/scalar-leafs': "error";
521
+ '@graphql-eslint/selection-set-depth': ["error", {
522
+ maxDepth: number;
523
+ }];
524
+ '@graphql-eslint/unique-argument-names': "error";
525
+ '@graphql-eslint/unique-directive-names-per-location': "error";
526
+ '@graphql-eslint/unique-fragment-name': "error";
527
+ '@graphql-eslint/unique-input-field-names': "error";
528
+ '@graphql-eslint/unique-operation-name': "error";
529
+ '@graphql-eslint/unique-variable-names': "error";
530
+ '@graphql-eslint/value-literals-of-correct-type': "error";
531
+ '@graphql-eslint/variables-are-input-types': "error";
532
+ '@graphql-eslint/variables-in-allowed-position': "error";
533
+ };
179
534
  };
180
535
  'flat/operations-all': {
181
- rules: any;
536
+ rules: {
537
+ '@graphql-eslint/alphabetize': ["error", {
538
+ definitions: boolean;
539
+ selections: string[];
540
+ variables: boolean;
541
+ arguments: string[];
542
+ groups: string[];
543
+ }];
544
+ '@graphql-eslint/lone-executable-definition': "error";
545
+ '@graphql-eslint/match-document-filename': ["error", {
546
+ query: string;
547
+ mutation: string;
548
+ subscription: string;
549
+ fragment: string;
550
+ }];
551
+ '@graphql-eslint/no-one-place-fragments': "error";
552
+ '@graphql-eslint/require-import-fragment': "error";
553
+ '@graphql-eslint/executable-definitions': "error";
554
+ '@graphql-eslint/fields-on-correct-type': "error";
555
+ '@graphql-eslint/fragments-on-composite-type': "error";
556
+ '@graphql-eslint/known-argument-names': "error";
557
+ '@graphql-eslint/known-directives': "error";
558
+ '@graphql-eslint/known-fragment-names': "error";
559
+ '@graphql-eslint/known-type-names': "error";
560
+ '@graphql-eslint/lone-anonymous-operation': "error";
561
+ '@graphql-eslint/naming-convention': ["error", {
562
+ VariableDefinition: string;
563
+ OperationDefinition: {
564
+ style: string;
565
+ forbiddenPrefixes: string[];
566
+ forbiddenSuffixes: string[];
567
+ };
568
+ FragmentDefinition: {
569
+ style: string;
570
+ forbiddenPrefixes: string[];
571
+ forbiddenSuffixes: string[];
572
+ };
573
+ }];
574
+ '@graphql-eslint/no-anonymous-operations': "error";
575
+ '@graphql-eslint/no-deprecated': "error";
576
+ '@graphql-eslint/no-duplicate-fields': "error";
577
+ '@graphql-eslint/no-fragment-cycles': "error";
578
+ '@graphql-eslint/no-undefined-variables': "error";
579
+ '@graphql-eslint/no-unused-fragments': "error";
580
+ '@graphql-eslint/no-unused-variables': "error";
581
+ '@graphql-eslint/one-field-subscriptions': "error";
582
+ '@graphql-eslint/overlapping-fields-can-be-merged': "error";
583
+ '@graphql-eslint/possible-fragment-spread': "error";
584
+ '@graphql-eslint/provided-required-arguments': "error";
585
+ '@graphql-eslint/require-selections': "error";
586
+ '@graphql-eslint/scalar-leafs': "error";
587
+ '@graphql-eslint/selection-set-depth': ["error", {
588
+ maxDepth: number;
589
+ }];
590
+ '@graphql-eslint/unique-argument-names': "error";
591
+ '@graphql-eslint/unique-directive-names-per-location': "error";
592
+ '@graphql-eslint/unique-fragment-name': "error";
593
+ '@graphql-eslint/unique-input-field-names': "error";
594
+ '@graphql-eslint/unique-operation-name': "error";
595
+ '@graphql-eslint/unique-variable-names': "error";
596
+ '@graphql-eslint/value-literals-of-correct-type': "error";
597
+ '@graphql-eslint/variables-are-input-types': "error";
598
+ '@graphql-eslint/variables-in-allowed-position': "error";
599
+ };
182
600
  };
183
601
  };
184
602
  };
package/esm/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./chunk-UIAXBAMD.js";
2
1
  import { configs } from "./configs/index.js";
3
2
  import { parseForESLint, parser } from "./parser.js";
4
3
  import { processor } from "./processor.js";
package/esm/meta.js CHANGED
@@ -1,5 +1,4 @@
1
- import "./chunk-UIAXBAMD.js";
2
- const version = "4.0.0-alpha.15";
1
+ const version = "4.0.0-alpha.16";
3
2
  export {
4
3
  version
5
4
  };
package/esm/parser.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./chunk-UIAXBAMD.js";
2
1
  import debugFactory from "debug";
3
2
  import { GraphQLError } from "graphql";
4
3
  import { parseGraphQLSDL } from "@graphql-tools/utils";
package/esm/processor.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./chunk-UIAXBAMD.js";
2
1
  import { relative } from "node:path";
3
2
  import {
4
3
  gqlPluckFromCodeStringSync
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import {
3
2
  Kind
4
3
  } from "graphql";
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { getNodeName } from "../../utils.js";
3
2
  const schema = {
4
3
  type: "array",
@@ -1,4 +1,3 @@
1
- import "../chunk-UIAXBAMD.js";
2
1
  import {
3
2
  Kind,
4
3
  validate,
@@ -12,10 +12,10 @@ import 'json-schema-to-ts';
12
12
 
13
13
  declare const rules: {
14
14
  alphabetize: GraphQLESLintRule<{
15
+ values?: boolean | undefined;
15
16
  definitions?: boolean | undefined;
16
17
  selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined;
17
18
  arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined;
18
- values?: boolean | undefined;
19
19
  fields?: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[] | undefined;
20
20
  variables?: boolean | undefined;
21
21
  groups?: string[] | undefined;
@@ -38,17 +38,17 @@ declare const rules: {
38
38
  suffix?: string | undefined;
39
39
  prefix?: string | undefined;
40
40
  } | undefined;
41
- mutation?: (CaseStyle | "matchDocumentStyle") | {
41
+ query?: (CaseStyle | "matchDocumentStyle") | {
42
42
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
43
43
  suffix?: string | undefined;
44
44
  prefix?: string | undefined;
45
45
  } | undefined;
46
- subscription?: (CaseStyle | "matchDocumentStyle") | {
46
+ mutation?: (CaseStyle | "matchDocumentStyle") | {
47
47
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
48
48
  suffix?: string | undefined;
49
49
  prefix?: string | undefined;
50
50
  } | undefined;
51
- query?: (CaseStyle | "matchDocumentStyle") | {
51
+ subscription?: (CaseStyle | "matchDocumentStyle") | {
52
52
  style?: (CaseStyle | "matchDocumentStyle") | undefined;
53
53
  suffix?: string | undefined;
54
54
  prefix?: string | undefined;
@@ -1,4 +1,3 @@
1
- import "../chunk-UIAXBAMD.js";
2
1
  import { rule as alphabetize } from "./alphabetize/index.js";
3
2
  import { rule as descriptionStyle } from "./description-style/index.js";
4
3
  import { GRAPHQL_JS_VALIDATIONS } from "./graphql-js-validation.js";
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import {
3
2
  Kind
4
3
  } from "graphql";
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { OperationTypeNode } from "graphql";
3
2
  import { ARRAY_DEFAULT_OPTIONS, getLocation, pascalCase } from "../../utils.js";
4
3
  const RULE_ID = "lone-executable-definition", definitionTypes = ["fragment", ...Object.values(OperationTypeNode)], schema = {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { basename, extname } from "node:path";
3
2
  import { Kind } from "graphql";
4
3
  import {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { Kind } from "graphql";
3
2
  import {
4
3
  ARRAY_DEFAULT_OPTIONS,
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { Kind } from "graphql";
3
2
  import { getLocation } from "../../utils.js";
4
3
  const RULE_ID = "no-anonymous-operations", rule = {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { displayNodeName, requireGraphQLSchemaFromContext } from "../../utils.js";
3
2
  const RULE_ID = "no-deprecated", rule = {
4
3
  meta: {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { Kind } from "graphql";
3
2
  const RULE_ID = "no-duplicate-fields", rule = {
4
3
  meta: {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { TokenKind } from "graphql";
3
2
  import { getNodeName } from "../../utils.js";
4
3
  const RULE_ID = "HASHTAG_COMMENT", rule = {
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { relative } from "node:path";
3
2
  import { visit } from "graphql";
4
3
  import { CWD, requireSiblingsOperations } from "../../utils.js";
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { ARRAY_DEFAULT_OPTIONS, requireGraphQLSchemaFromContext, truthy } from "../../utils.js";
3
2
  const schema = {
4
3
  type: "array",
@@ -1,4 +1,3 @@
1
- import "../../chunk-UIAXBAMD.js";
2
1
  import { isScalarType, Kind } from "graphql";
3
2
  import { getNodeName, requireGraphQLSchemaFromContext } from "../../utils.js";
4
3
  const RULE_ID = "no-scalar-result-type-on-mutation", rule = {