@graphql-eslint/eslint-plugin 4.4.0-alpha-20241207211207-bb82835bf9da71bdd9bedaeadb75c8c1625ecd87 → 4.4.0-alpha-20241210121000-22133a7d66f4a5d831e5588ca0ce4fc789bca4ed

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.
Files changed (160) hide show
  1. package/cjs/graphql-config.d.cts +1 -2
  2. package/cjs/index.d.cts +1 -2
  3. package/cjs/meta.js +1 -1
  4. package/cjs/parser.d.cts +1 -2
  5. package/cjs/rules/alphabetize/index.d.cts +1 -1
  6. package/cjs/rules/alphabetize/index.js +2 -1
  7. package/cjs/rules/description-style/index.d.cts +1 -1
  8. package/cjs/rules/description-style/index.js +3 -1
  9. package/cjs/rules/graphql-js-validation.d.cts +1 -2
  10. package/cjs/rules/graphql-js-validation.js +31 -30
  11. package/cjs/rules/index.d.cts +1 -2
  12. package/cjs/rules/input-name/index.d.cts +1 -1
  13. package/cjs/rules/input-name/index.js +3 -1
  14. package/cjs/rules/lone-executable-definition/index.d.cts +1 -1
  15. package/cjs/rules/lone-executable-definition/index.js +2 -1
  16. package/cjs/rules/match-document-filename/index.d.cts +1 -1
  17. package/cjs/rules/match-document-filename/index.js +2 -1
  18. package/cjs/rules/naming-convention/index.d.cts +1 -1
  19. package/cjs/rules/naming-convention/index.js +3 -1
  20. package/cjs/rules/no-anonymous-operations/index.d.cts +1 -2
  21. package/cjs/rules/no-anonymous-operations/index.js +2 -1
  22. package/cjs/rules/no-deprecated/index.d.cts +1 -2
  23. package/cjs/rules/no-deprecated/index.js +2 -1
  24. package/cjs/rules/no-duplicate-fields/index.d.cts +1 -2
  25. package/cjs/rules/no-duplicate-fields/index.js +2 -1
  26. package/cjs/rules/no-hashtag-description/index.d.cts +1 -2
  27. package/cjs/rules/no-hashtag-description/index.js +2 -1
  28. package/cjs/rules/no-one-place-fragments/index.d.cts +1 -2
  29. package/cjs/rules/no-one-place-fragments/index.js +1 -1
  30. package/cjs/rules/no-root-type/index.d.cts +1 -1
  31. package/cjs/rules/no-root-type/index.js +3 -1
  32. package/cjs/rules/no-scalar-result-type-on-mutation/index.d.cts +1 -2
  33. package/cjs/rules/no-scalar-result-type-on-mutation/index.js +2 -1
  34. package/cjs/rules/no-typename-prefix/index.d.cts +1 -2
  35. package/cjs/rules/no-typename-prefix/index.js +2 -1
  36. package/cjs/rules/no-unreachable-types/index.d.cts +1 -2
  37. package/cjs/rules/no-unreachable-types/index.js +2 -1
  38. package/cjs/rules/no-unused-fields/index.d.cts +1 -1
  39. package/cjs/rules/no-unused-fields/index.js +2 -1
  40. package/cjs/rules/relay-arguments/index.d.cts +1 -1
  41. package/cjs/rules/relay-arguments/index.js +1 -1
  42. package/cjs/rules/relay-connection-types/index.d.cts +1 -2
  43. package/cjs/rules/relay-connection-types/index.js +1 -1
  44. package/cjs/rules/relay-edge-types/index.d.cts +1 -1
  45. package/cjs/rules/relay-edge-types/index.js +1 -1
  46. package/cjs/rules/relay-page-info/index.d.cts +1 -2
  47. package/cjs/rules/relay-page-info/index.js +1 -1
  48. package/cjs/rules/require-deprecation-date/index.d.cts +1 -1
  49. package/cjs/rules/require-deprecation-date/index.js +2 -1
  50. package/cjs/rules/require-deprecation-reason/index.d.cts +1 -2
  51. package/cjs/rules/require-deprecation-reason/index.js +1 -1
  52. package/cjs/rules/require-description/index.d.cts +1 -1
  53. package/cjs/rules/require-description/index.js +2 -1
  54. package/cjs/rules/require-field-of-type-query-in-mutation-result/index.d.cts +1 -2
  55. package/cjs/rules/require-field-of-type-query-in-mutation-result/index.js +1 -1
  56. package/cjs/rules/require-import-fragment/index.d.cts +1 -2
  57. package/cjs/rules/require-import-fragment/index.js +2 -1
  58. package/cjs/rules/require-nullable-fields-with-oneof/index.d.cts +1 -2
  59. package/cjs/rules/require-nullable-fields-with-oneof/index.js +1 -1
  60. package/cjs/rules/require-nullable-result-in-root/index.d.cts +1 -2
  61. package/cjs/rules/require-nullable-result-in-root/index.js +2 -1
  62. package/cjs/rules/require-selections/index.d.cts +1 -1
  63. package/cjs/rules/require-selections/index.js +8 -4
  64. package/cjs/rules/require-type-pattern-with-oneof/index.d.cts +1 -2
  65. package/cjs/rules/require-type-pattern-with-oneof/index.js +1 -1
  66. package/cjs/rules/selection-set-depth/index.d.cts +1 -1
  67. package/cjs/rules/selection-set-depth/index.js +3 -1
  68. package/cjs/rules/strict-id-in-types/index.d.cts +1 -1
  69. package/cjs/rules/strict-id-in-types/index.js +5 -5
  70. package/cjs/rules/unique-enum-value-names/index.d.cts +1 -2
  71. package/cjs/rules/unique-enum-value-names/index.js +2 -1
  72. package/cjs/rules/unique-fragment-name/index.d.cts +0 -1
  73. package/cjs/rules/unique-fragment-name/index.js +1 -2
  74. package/cjs/rules/unique-operation-name/index.d.cts +1 -2
  75. package/cjs/rules/unique-operation-name/index.js +1 -1
  76. package/cjs/schema.d.cts +1 -2
  77. package/cjs/types.d.cts +7 -17
  78. package/cjs/utils.d.cts +2 -2
  79. package/cjs/utils.js +5 -1
  80. package/esm/graphql-config.d.ts +1 -2
  81. package/esm/index.d.ts +0 -1
  82. package/esm/meta.js +1 -1
  83. package/esm/parser.d.ts +1 -2
  84. package/esm/rules/alphabetize/index.d.ts +1 -1
  85. package/esm/rules/alphabetize/index.js +2 -1
  86. package/esm/rules/description-style/index.d.ts +1 -1
  87. package/esm/rules/description-style/index.js +3 -1
  88. package/esm/rules/graphql-js-validation.d.ts +1 -2
  89. package/esm/rules/graphql-js-validation.js +31 -30
  90. package/esm/rules/index.d.ts +0 -1
  91. package/esm/rules/input-name/index.d.ts +1 -1
  92. package/esm/rules/input-name/index.js +3 -1
  93. package/esm/rules/lone-executable-definition/index.d.ts +1 -1
  94. package/esm/rules/lone-executable-definition/index.js +2 -1
  95. package/esm/rules/match-document-filename/index.d.ts +1 -1
  96. package/esm/rules/match-document-filename/index.js +2 -1
  97. package/esm/rules/naming-convention/index.d.ts +1 -1
  98. package/esm/rules/naming-convention/index.js +3 -1
  99. package/esm/rules/no-anonymous-operations/index.d.ts +1 -2
  100. package/esm/rules/no-anonymous-operations/index.js +2 -1
  101. package/esm/rules/no-deprecated/index.d.ts +1 -2
  102. package/esm/rules/no-deprecated/index.js +2 -1
  103. package/esm/rules/no-duplicate-fields/index.d.ts +1 -2
  104. package/esm/rules/no-duplicate-fields/index.js +2 -1
  105. package/esm/rules/no-hashtag-description/index.d.ts +1 -2
  106. package/esm/rules/no-hashtag-description/index.js +2 -1
  107. package/esm/rules/no-one-place-fragments/index.d.ts +1 -2
  108. package/esm/rules/no-one-place-fragments/index.js +1 -1
  109. package/esm/rules/no-root-type/index.d.ts +1 -1
  110. package/esm/rules/no-root-type/index.js +3 -1
  111. package/esm/rules/no-scalar-result-type-on-mutation/index.d.ts +1 -2
  112. package/esm/rules/no-scalar-result-type-on-mutation/index.js +2 -1
  113. package/esm/rules/no-typename-prefix/index.d.ts +1 -2
  114. package/esm/rules/no-typename-prefix/index.js +2 -1
  115. package/esm/rules/no-unreachable-types/index.d.ts +1 -2
  116. package/esm/rules/no-unreachable-types/index.js +2 -1
  117. package/esm/rules/no-unused-fields/index.d.ts +1 -1
  118. package/esm/rules/no-unused-fields/index.js +2 -1
  119. package/esm/rules/relay-arguments/index.d.ts +1 -1
  120. package/esm/rules/relay-arguments/index.js +1 -1
  121. package/esm/rules/relay-connection-types/index.d.ts +1 -2
  122. package/esm/rules/relay-connection-types/index.js +1 -1
  123. package/esm/rules/relay-edge-types/index.d.ts +1 -1
  124. package/esm/rules/relay-edge-types/index.js +1 -1
  125. package/esm/rules/relay-page-info/index.d.ts +1 -2
  126. package/esm/rules/relay-page-info/index.js +1 -1
  127. package/esm/rules/require-deprecation-date/index.d.ts +1 -1
  128. package/esm/rules/require-deprecation-date/index.js +2 -1
  129. package/esm/rules/require-deprecation-reason/index.d.ts +1 -2
  130. package/esm/rules/require-deprecation-reason/index.js +1 -1
  131. package/esm/rules/require-description/index.d.ts +1 -1
  132. package/esm/rules/require-description/index.js +2 -1
  133. package/esm/rules/require-field-of-type-query-in-mutation-result/index.d.ts +1 -2
  134. package/esm/rules/require-field-of-type-query-in-mutation-result/index.js +1 -1
  135. package/esm/rules/require-import-fragment/index.d.ts +1 -2
  136. package/esm/rules/require-import-fragment/index.js +2 -1
  137. package/esm/rules/require-nullable-fields-with-oneof/index.d.ts +1 -2
  138. package/esm/rules/require-nullable-fields-with-oneof/index.js +1 -1
  139. package/esm/rules/require-nullable-result-in-root/index.d.ts +1 -2
  140. package/esm/rules/require-nullable-result-in-root/index.js +2 -1
  141. package/esm/rules/require-selections/index.d.ts +1 -1
  142. package/esm/rules/require-selections/index.js +8 -4
  143. package/esm/rules/require-type-pattern-with-oneof/index.d.ts +1 -2
  144. package/esm/rules/require-type-pattern-with-oneof/index.js +1 -1
  145. package/esm/rules/selection-set-depth/index.d.ts +1 -1
  146. package/esm/rules/selection-set-depth/index.js +3 -1
  147. package/esm/rules/strict-id-in-types/index.d.ts +1 -1
  148. package/esm/rules/strict-id-in-types/index.js +5 -5
  149. package/esm/rules/unique-enum-value-names/index.d.ts +1 -2
  150. package/esm/rules/unique-enum-value-names/index.js +2 -1
  151. package/esm/rules/unique-fragment-name/index.d.ts +0 -1
  152. package/esm/rules/unique-fragment-name/index.js +1 -2
  153. package/esm/rules/unique-operation-name/index.d.ts +1 -2
  154. package/esm/rules/unique-operation-name/index.js +1 -1
  155. package/esm/schema.d.ts +1 -2
  156. package/esm/types.d.ts +7 -17
  157. package/esm/utils.d.ts +2 -2
  158. package/esm/utils.js +4 -0
  159. package/package.json +11 -1
  160. package/{index.browser.js → programmatic.js} +104 -73
@@ -408,7 +408,7 @@ function convertToESTree(node, schema16) {
408
408
  }
409
409
 
410
410
  // src/meta.ts
411
- var version = "4.4.0-alpha-20241207211207-bb82835bf9da71bdd9bedaeadb75c8c1625ecd87";
411
+ var version = "4.4.0-alpha-20241210121000-22133a7d66f4a5d831e5588ca0ce4fc789bca4ed";
412
412
 
413
413
  // src/siblings.ts
414
414
  import {
@@ -577,6 +577,9 @@ var eslintSelectorsTip = `> [!TIP]
577
577
  >
578
578
  > These fields are defined by ESLint [\`selectors\`](https://eslint.org/docs/developer-guide/selectors).
579
579
  > Paste or drop code into the editor in [ASTExplorer](https://astexplorer.net) and inspect the generated AST to compose your selector.`;
580
+ function pluralize(size) {
581
+ return size > 1 ? "s" : "";
582
+ }
580
583
 
581
584
  // src/siblings.ts
582
585
  var siblingOperationsCache = /* @__PURE__ */ new Map();
@@ -860,7 +863,7 @@ var rule = {
860
863
  type: "suggestion",
861
864
  fixable: "code",
862
865
  docs: {
863
- category: ["Schema", "Operations"],
866
+ category: "schema-and-operations",
864
867
  description: "Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more.",
865
868
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID}`,
866
869
  examples: [
@@ -1058,6 +1061,7 @@ var rule = {
1058
1061
  currNode: displayNodeName(currNode),
1059
1062
  prevNode: prevName ? displayNodeName(prevNode) : lowerCase2(prevNode.kind)
1060
1063
  },
1064
+ // @ts-expect-error -- fixme
1061
1065
  *fix(fixer) {
1062
1066
  const prevRange = getRangeWithComments(prevNode);
1063
1067
  const currRange = getRangeWithComments(currNode);
@@ -1192,10 +1196,11 @@ var rule2 = {
1192
1196
  }
1193
1197
  ],
1194
1198
  description: "Require all comments to follow the same style (either block or inline).",
1195
- category: "Schema",
1199
+ category: "schema",
1196
1200
  url: "https://the-guild.dev/graphql/eslint/rules/description-style",
1197
1201
  recommended: true
1198
1202
  },
1203
+ // @ts-expect-error -- fixme
1199
1204
  schema: schema2
1200
1205
  },
1201
1206
  create(context) {
@@ -1211,6 +1216,7 @@ var rule2 = {
1211
1216
  suggest: [
1212
1217
  {
1213
1218
  desc: `Change to ${isBlock ? "block" : "inline"} style description`,
1219
+ // @ts-expect-error -- fixme
1214
1220
  fix(fixer) {
1215
1221
  const sourceCode = context.getSourceCode();
1216
1222
  const originalText = sourceCode.getText(node);
@@ -1300,6 +1306,7 @@ function validateDocument({
1300
1306
  const { name } = match.groups;
1301
1307
  return {
1302
1308
  desc: `Rename to \`${name}\``,
1309
+ // @ts-expect-error -- fixme
1303
1310
  fix: (fixer) => fixer.replaceText(token, name)
1304
1311
  };
1305
1312
  }) : []
@@ -1401,7 +1408,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1401
1408
  rule: ExecutableDefinitionsRule
1402
1409
  },
1403
1410
  {
1404
- category: "Operations",
1411
+ category: "operations",
1405
1412
  description: "A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.",
1406
1413
  requiresSchema: true
1407
1414
  }
@@ -1413,7 +1420,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1413
1420
  hasDidYouMeanSuggestions: true
1414
1421
  },
1415
1422
  {
1416
- category: "Operations",
1423
+ category: "operations",
1417
1424
  description: "A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`.",
1418
1425
  requiresSchema: true
1419
1426
  }
@@ -1424,7 +1431,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1424
1431
  rule: FragmentsOnCompositeTypesRule
1425
1432
  },
1426
1433
  {
1427
- category: "Operations",
1434
+ category: "operations",
1428
1435
  description: "Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.",
1429
1436
  requiresSchema: true
1430
1437
  }
@@ -1436,7 +1443,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1436
1443
  hasDidYouMeanSuggestions: true
1437
1444
  },
1438
1445
  {
1439
- category: ["Schema", "Operations"],
1446
+ category: "schema-and-operations",
1440
1447
  description: "A GraphQL field is only valid if all supplied arguments are defined by that field.",
1441
1448
  requiresSchema: true
1442
1449
  }
@@ -1475,7 +1482,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1475
1482
  }
1476
1483
  },
1477
1484
  {
1478
- category: ["Schema", "Operations"],
1485
+ category: "schema-and-operations",
1479
1486
  description: "A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.",
1480
1487
  requiresSchema: true,
1481
1488
  examples: [
@@ -1503,7 +1510,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1503
1510
  getDocumentNode: handleMissingFragments
1504
1511
  },
1505
1512
  {
1506
- category: "Operations",
1513
+ category: "operations",
1507
1514
  description: "A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.",
1508
1515
  requiresSchema: true,
1509
1516
  requiresSiblings: true,
@@ -1571,7 +1578,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1571
1578
  hasDidYouMeanSuggestions: true
1572
1579
  },
1573
1580
  {
1574
- category: ["Schema", "Operations"],
1581
+ category: "schema-and-operations",
1575
1582
  description: "A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.",
1576
1583
  requiresSchema: true
1577
1584
  }
@@ -1582,7 +1589,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1582
1589
  rule: LoneAnonymousOperationRule
1583
1590
  },
1584
1591
  {
1585
- category: "Operations",
1592
+ category: "operations",
1586
1593
  description: "A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.",
1587
1594
  requiresSchema: true
1588
1595
  }
@@ -1593,7 +1600,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1593
1600
  rule: LoneSchemaDefinitionRule
1594
1601
  },
1595
1602
  {
1596
- category: "Schema",
1603
+ category: "schema",
1597
1604
  description: "A GraphQL document is only valid if it contains only one schema definition."
1598
1605
  }
1599
1606
  ),
@@ -1603,7 +1610,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1603
1610
  rule: NoFragmentCyclesRule
1604
1611
  },
1605
1612
  {
1606
- category: "Operations",
1613
+ category: "operations",
1607
1614
  description: "A GraphQL fragment is only valid when it does not have cycles in fragments usage.",
1608
1615
  requiresSchema: true
1609
1616
  }
@@ -1615,7 +1622,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1615
1622
  getDocumentNode: handleMissingFragments
1616
1623
  },
1617
1624
  {
1618
- category: "Operations",
1625
+ category: "operations",
1619
1626
  description: "A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.",
1620
1627
  requiresSchema: true,
1621
1628
  requiresSiblings: true
@@ -1662,7 +1669,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1662
1669
  }
1663
1670
  },
1664
1671
  {
1665
- category: "Operations",
1672
+ category: "operations",
1666
1673
  description: "A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.",
1667
1674
  requiresSchema: true,
1668
1675
  requiresSiblings: true
@@ -1675,7 +1682,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1675
1682
  getDocumentNode: handleMissingFragments
1676
1683
  },
1677
1684
  {
1678
- category: "Operations",
1685
+ category: "operations",
1679
1686
  description: "A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.",
1680
1687
  requiresSchema: true,
1681
1688
  requiresSiblings: true
@@ -1687,7 +1694,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1687
1694
  rule: OverlappingFieldsCanBeMergedRule
1688
1695
  },
1689
1696
  {
1690
- category: "Operations",
1697
+ category: "operations",
1691
1698
  description: "A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.",
1692
1699
  requiresSchema: true
1693
1700
  }
@@ -1698,7 +1705,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1698
1705
  rule: PossibleFragmentSpreadsRule
1699
1706
  },
1700
1707
  {
1701
- category: "Operations",
1708
+ category: "operations",
1702
1709
  description: "A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.",
1703
1710
  requiresSchema: true
1704
1711
  }
@@ -1710,7 +1717,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1710
1717
  hasDidYouMeanSuggestions: true
1711
1718
  },
1712
1719
  {
1713
- category: "Schema",
1720
+ category: "schema",
1714
1721
  description: "A type extension is only valid if the type is defined and has the same kind.",
1715
1722
  recommended: true,
1716
1723
  requiresSchema: true
@@ -1722,7 +1729,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1722
1729
  rule: ProvidedRequiredArgumentsRule
1723
1730
  },
1724
1731
  {
1725
- category: ["Schema", "Operations"],
1732
+ category: "schema-and-operations",
1726
1733
  description: "A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.",
1727
1734
  requiresSchema: true
1728
1735
  }
@@ -1734,7 +1741,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1734
1741
  hasDidYouMeanSuggestions: true
1735
1742
  },
1736
1743
  {
1737
- category: "Operations",
1744
+ category: "operations",
1738
1745
  description: "A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.",
1739
1746
  requiresSchema: true
1740
1747
  }
@@ -1745,7 +1752,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1745
1752
  rule: SingleFieldSubscriptionsRule
1746
1753
  },
1747
1754
  {
1748
- category: "Operations",
1755
+ category: "operations",
1749
1756
  description: "A GraphQL subscription is valid only if it contains a single root field.",
1750
1757
  requiresSchema: true
1751
1758
  }
@@ -1756,7 +1763,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1756
1763
  rule: UniqueArgumentNamesRule
1757
1764
  },
1758
1765
  {
1759
- category: "Operations",
1766
+ category: "operations",
1760
1767
  description: "A GraphQL field or directive is only valid if all supplied arguments are uniquely named.",
1761
1768
  requiresSchema: true
1762
1769
  }
@@ -1767,7 +1774,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1767
1774
  rule: UniqueDirectiveNamesRule
1768
1775
  },
1769
1776
  {
1770
- category: "Schema",
1777
+ category: "schema",
1771
1778
  description: "A GraphQL document is only valid if all defined directives have unique names."
1772
1779
  }
1773
1780
  ),
@@ -1777,7 +1784,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1777
1784
  rule: UniqueDirectivesPerLocationRule
1778
1785
  },
1779
1786
  {
1780
- category: ["Schema", "Operations"],
1787
+ category: "schema-and-operations",
1781
1788
  description: "A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.",
1782
1789
  requiresSchema: true
1783
1790
  }
@@ -1788,7 +1795,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1788
1795
  rule: UniqueFieldDefinitionNamesRule
1789
1796
  },
1790
1797
  {
1791
- category: "Schema",
1798
+ category: "schema",
1792
1799
  description: "A GraphQL complex type is only valid if all its fields are uniquely named."
1793
1800
  }
1794
1801
  ),
@@ -1798,7 +1805,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1798
1805
  rule: UniqueInputFieldNamesRule
1799
1806
  },
1800
1807
  {
1801
- category: "Operations",
1808
+ category: "operations",
1802
1809
  description: "A GraphQL input object value is only valid if all supplied fields are uniquely named."
1803
1810
  }
1804
1811
  ),
@@ -1808,7 +1815,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1808
1815
  rule: UniqueOperationTypesRule
1809
1816
  },
1810
1817
  {
1811
- category: "Schema",
1818
+ category: "schema",
1812
1819
  description: "A GraphQL document is only valid if it has only one type per operation."
1813
1820
  }
1814
1821
  ),
@@ -1818,7 +1825,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1818
1825
  rule: UniqueTypeNamesRule
1819
1826
  },
1820
1827
  {
1821
- category: "Schema",
1828
+ category: "schema",
1822
1829
  description: "A GraphQL document is only valid if all defined types have unique names."
1823
1830
  }
1824
1831
  ),
@@ -1828,7 +1835,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1828
1835
  rule: UniqueVariableNamesRule
1829
1836
  },
1830
1837
  {
1831
- category: "Operations",
1838
+ category: "operations",
1832
1839
  description: "A GraphQL operation is only valid if all its variables are uniquely named.",
1833
1840
  requiresSchema: true
1834
1841
  }
@@ -1840,7 +1847,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1840
1847
  hasDidYouMeanSuggestions: true
1841
1848
  },
1842
1849
  {
1843
- category: "Operations",
1850
+ category: "operations",
1844
1851
  description: "A GraphQL document is only valid if all value literals are of the type expected at their position.",
1845
1852
  requiresSchema: true
1846
1853
  }
@@ -1851,7 +1858,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1851
1858
  rule: VariablesAreInputTypesRule
1852
1859
  },
1853
1860
  {
1854
- category: "Operations",
1861
+ category: "operations",
1855
1862
  description: "A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).",
1856
1863
  requiresSchema: true
1857
1864
  }
@@ -1862,7 +1869,7 @@ var GRAPHQL_JS_VALIDATIONS = Object.assign(
1862
1869
  rule: VariablesInAllowedPositionRule
1863
1870
  },
1864
1871
  {
1865
- category: "Operations",
1872
+ category: "operations",
1866
1873
  description: "Variables passed to field arguments conform to type.",
1867
1874
  requiresSchema: true
1868
1875
  }
@@ -1915,7 +1922,7 @@ var rule3 = {
1915
1922
  hasSuggestions: true,
1916
1923
  docs: {
1917
1924
  description: 'Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".\nUsing the same name for all input parameters will make your schemas easier to consume and more predictable. Using the same name as mutation for InputType will make it easier to find mutations that InputType belongs to.',
1918
- category: "Schema",
1925
+ category: "schema",
1919
1926
  url: "https://the-guild.dev/graphql/eslint/rules/input-name",
1920
1927
  examples: [
1921
1928
  {
@@ -1977,6 +1984,7 @@ var rule3 = {
1977
1984
  suggest: [
1978
1985
  {
1979
1986
  desc: "Rename to `input`",
1987
+ // @ts-expect-error -- fixme
1980
1988
  fix: (fixer) => fixer.replaceText(node, "input")
1981
1989
  }
1982
1990
  ]
@@ -2004,6 +2012,7 @@ var rule3 = {
2004
2012
  suggest: [
2005
2013
  {
2006
2014
  desc: `Rename to \`${mutationName}\``,
2015
+ // @ts-expect-error -- fixme
2007
2016
  fix: (fixer) => fixer.replaceText(node, mutationName)
2008
2017
  }
2009
2018
  ]
@@ -2044,7 +2053,7 @@ var rule4 = {
2044
2053
  meta: {
2045
2054
  type: "suggestion",
2046
2055
  docs: {
2047
- category: "Operations",
2056
+ category: "operations",
2048
2057
  description: "Require queries, mutations, subscriptions or fragments to be located in separate files.",
2049
2058
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID2}`,
2050
2059
  examples: [
@@ -2078,6 +2087,7 @@ var rule4 = {
2078
2087
  messages: {
2079
2088
  [RULE_ID2]: "{{name}} should be in a separate file."
2080
2089
  },
2090
+ // @ts-expect-error -- fixme
2081
2091
  schema: schema4
2082
2092
  },
2083
2093
  create(context) {
@@ -2162,7 +2172,7 @@ var rule5 = {
2162
2172
  meta: {
2163
2173
  type: "suggestion",
2164
2174
  docs: {
2165
- category: "Operations",
2175
+ category: "operations",
2166
2176
  description: "This rule allows you to enforce that the file name should match the operation name.",
2167
2177
  url: "https://the-guild.dev/graphql/eslint/rules/match-document-filename",
2168
2178
  examples: [
@@ -2293,6 +2303,7 @@ var rule5 = {
2293
2303
  [MATCH_EXTENSION]: `File extension "{{ fileExtension }}" don't match extension "{{ expectedFileExtension }}"`,
2294
2304
  [MATCH_STYLE]: 'Unexpected filename "{{ filename }}". Rename it to "{{ expectedFilename }}"'
2295
2305
  },
2306
+ // @ts-expect-error -- fixme
2296
2307
  schema: schema5
2297
2308
  },
2298
2309
  create(context) {
@@ -2495,7 +2506,7 @@ var rule6 = {
2495
2506
  type: "suggestion",
2496
2507
  docs: {
2497
2508
  description: "Require names to follow specified conventions.",
2498
- category: ["Schema", "Operations"],
2509
+ category: "schema-and-operations",
2499
2510
  recommended: true,
2500
2511
  url: "https://the-guild.dev/graphql/eslint/rules/naming-convention",
2501
2512
  examples: [
@@ -2721,6 +2732,7 @@ var rule6 = {
2721
2732
  }
2722
2733
  },
2723
2734
  hasSuggestions: true,
2735
+ // @ts-expect-error -- fixme
2724
2736
  schema: schema6
2725
2737
  },
2726
2738
  create(context) {
@@ -2737,6 +2749,7 @@ var rule6 = {
2737
2749
  message,
2738
2750
  suggest: suggestedNames.map((suggestedName) => ({
2739
2751
  desc: `Rename to \`${suggestedName}\``,
2752
+ // @ts-expect-error -- fixme
2740
2753
  fix: (fixer) => fixer.replaceText(node, suggestedName)
2741
2754
  }))
2742
2755
  });
@@ -2914,7 +2927,7 @@ var rule7 = {
2914
2927
  type: "suggestion",
2915
2928
  hasSuggestions: true,
2916
2929
  docs: {
2917
- category: "Operations",
2930
+ category: "operations",
2918
2931
  description: "Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.",
2919
2932
  recommended: true,
2920
2933
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID3}`,
@@ -2962,6 +2975,7 @@ var rule7 = {
2962
2975
  suggest: [
2963
2976
  {
2964
2977
  desc: `Rename to \`${suggestedName}\``,
2978
+ // @ts-expect-error -- fixme
2965
2979
  fix(fixer) {
2966
2980
  const sourceCode = context.getSourceCode();
2967
2981
  const hasQueryKeyword = sourceCode.getText({ range: [node.range[0], node.range[0] + 1] }) !== "{";
@@ -2985,7 +2999,7 @@ var rule8 = {
2985
2999
  type: "suggestion",
2986
3000
  hasSuggestions: true,
2987
3001
  docs: {
2988
- category: "Operations",
3002
+ category: "operations",
2989
3003
  description: "Enforce that deprecated fields or enum values are not in use by operations.",
2990
3004
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID4}`,
2991
3005
  requiresSchema: true,
@@ -3081,6 +3095,7 @@ var rule8 = {
3081
3095
  suggest: [
3082
3096
  {
3083
3097
  desc: `Remove ${nodeType}`,
3098
+ // @ts-expect-error -- fixme
3084
3099
  fix: (fixer) => fixer.remove(node)
3085
3100
  }
3086
3101
  ]
@@ -3135,7 +3150,7 @@ var rule9 = {
3135
3150
  hasSuggestions: true,
3136
3151
  docs: {
3137
3152
  description: "Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.",
3138
- category: "Operations",
3153
+ category: "operations",
3139
3154
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID5}`,
3140
3155
  recommended: true,
3141
3156
  examples: [
@@ -3210,6 +3225,7 @@ var rule9 = {
3210
3225
  suggest: [
3211
3226
  {
3212
3227
  desc: `Remove \`${fieldName}\` ${parent.type.toLowerCase()}`,
3228
+ // @ts-expect-error -- fixme
3213
3229
  fix(fixer) {
3214
3230
  return fixer.remove(
3215
3231
  parent.type === Kind10.VARIABLE ? parent.parent : parent
@@ -3260,7 +3276,7 @@ var rule10 = {
3260
3276
  },
3261
3277
  docs: {
3262
3278
  description: 'Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.\nAllows to use hashtag for comments, as long as it\'s not attached to an AST definition.',
3263
- category: "Schema",
3279
+ category: "schema",
3264
3280
  url: "https://the-guild.dev/graphql/eslint/rules/no-hashtag-description",
3265
3281
  examples: [
3266
3282
  {
@@ -3340,6 +3356,7 @@ var rule10 = {
3340
3356
  },
3341
3357
  suggest: ['"""', '"'].map((descriptionSyntax) => ({
3342
3358
  desc: `Replace with \`${descriptionSyntax}\` description syntax`,
3359
+ // @ts-expect-error -- fixme
3343
3360
  fix: (fixer) => fixer.replaceTextRange(
3344
3361
  [token.start, token.end],
3345
3362
  [descriptionSyntax, value.trim(), descriptionSyntax].join("")
@@ -3366,7 +3383,7 @@ var rule11 = {
3366
3383
  meta: {
3367
3384
  type: "suggestion",
3368
3385
  docs: {
3369
- category: "Operations",
3386
+ category: "operations",
3370
3387
  description: "Disallow fragments that are used only in one place.",
3371
3388
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID7}`,
3372
3389
  examples: [
@@ -3469,7 +3486,7 @@ var rule12 = {
3469
3486
  type: "suggestion",
3470
3487
  hasSuggestions: true,
3471
3488
  docs: {
3472
- category: "Schema",
3489
+ category: "schema",
3473
3490
  description: "Disallow using root types `mutation` and/or `subscription`.",
3474
3491
  url: "https://the-guild.dev/graphql/eslint/rules/no-root-type",
3475
3492
  requiresSchema: true,
@@ -3501,6 +3518,7 @@ var rule12 = {
3501
3518
  ],
3502
3519
  configOptions: [{ disallow: ["mutation", "subscription"] }]
3503
3520
  },
3521
+ // @ts-expect-error -- fixme
3504
3522
  schema: schema7
3505
3523
  },
3506
3524
  create(context) {
@@ -3523,6 +3541,7 @@ var rule12 = {
3523
3541
  suggest: [
3524
3542
  {
3525
3543
  desc: `Remove \`${typeName}\` type`,
3544
+ // @ts-expect-error -- fixme
3526
3545
  fix: (fixer) => fixer.remove(node.parent)
3527
3546
  }
3528
3547
  ]
@@ -3540,7 +3559,7 @@ var rule13 = {
3540
3559
  type: "suggestion",
3541
3560
  hasSuggestions: true,
3542
3561
  docs: {
3543
- category: "Schema",
3562
+ category: "schema",
3544
3563
  description: "Avoid scalar result type on mutation type to make sure to return a valid state.",
3545
3564
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID8}`,
3546
3565
  requiresSchema: true,
@@ -3596,6 +3615,7 @@ var rule13 = {
3596
3615
  suggest: [
3597
3616
  {
3598
3617
  desc: `Remove \`${typeName}\``,
3618
+ // @ts-expect-error -- fixme
3599
3619
  fix: (fixer) => fixer.remove(node)
3600
3620
  }
3601
3621
  ]
@@ -3613,7 +3633,7 @@ var rule14 = {
3613
3633
  type: "suggestion",
3614
3634
  hasSuggestions: true,
3615
3635
  docs: {
3616
- category: "Schema",
3636
+ category: "schema",
3617
3637
  description: "Enforces users to avoid using the type name in a field name while defining your schema.",
3618
3638
  recommended: true,
3619
3639
  url: "https://the-guild.dev/graphql/eslint/rules/no-typename-prefix",
@@ -3665,6 +3685,7 @@ var rule14 = {
3665
3685
  suggest: [
3666
3686
  {
3667
3687
  desc: `Remove \`${fieldName.slice(0, typeName.length)}\` prefix`,
3688
+ // @ts-expect-error -- fixme
3668
3689
  fix: (fixer) => fixer.replaceText(
3669
3690
  field.name,
3670
3691
  fieldName.replace(new RegExp(`^${typeName}`, "i"), "")
@@ -3775,7 +3796,7 @@ var rule15 = {
3775
3796
  },
3776
3797
  docs: {
3777
3798
  description: "Requires all types to be reachable at some level by root level fields.",
3778
- category: "Schema",
3799
+ category: "schema",
3779
3800
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID9}`,
3780
3801
  requiresSchema: true,
3781
3802
  examples: [
@@ -3836,6 +3857,7 @@ var rule15 = {
3836
3857
  suggest: [
3837
3858
  {
3838
3859
  desc: `Remove \`${typeName}\``,
3860
+ // @ts-expect-error -- fixme
3839
3861
  fix: (fixer) => fixer.remove(node.parent)
3840
3862
  }
3841
3863
  ]
@@ -3977,7 +3999,7 @@ var rule16 = {
3977
3999
  },
3978
4000
  docs: {
3979
4001
  description: "Requires all fields to be used at some level by siblings operations.",
3980
- category: "Schema",
4002
+ category: "schema",
3981
4003
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID10}`,
3982
4004
  requiresSiblings: true,
3983
4005
  requiresSchema: true,
@@ -4075,6 +4097,7 @@ var rule16 = {
4075
4097
  suggest: [
4076
4098
  {
4077
4099
  desc: `Remove \`${fieldName}\` field`,
4100
+ // @ts-expect-error -- fixme
4078
4101
  fix(fixer) {
4079
4102
  const sourceCode = context.getSourceCode();
4080
4103
  const tokenBefore = sourceCode.getTokenBefore(node);
@@ -4114,7 +4137,7 @@ var rule17 = {
4114
4137
  meta: {
4115
4138
  type: "problem",
4116
4139
  docs: {
4117
- category: "Schema",
4140
+ category: "schema",
4118
4141
  description: [
4119
4142
  "Set of rules to follow Relay specification for Arguments.",
4120
4143
  "",
@@ -4238,7 +4261,7 @@ var rule18 = {
4238
4261
  meta: {
4239
4262
  type: "problem",
4240
4263
  docs: {
4241
- category: "Schema",
4264
+ category: "schema",
4242
4265
  description: [
4243
4266
  "Set of rules to follow Relay specification for Connection types.",
4244
4267
  "",
@@ -4392,7 +4415,7 @@ var rule19 = {
4392
4415
  meta: {
4393
4416
  type: "problem",
4394
4417
  docs: {
4395
- category: "Schema",
4418
+ category: "schema",
4396
4419
  description: [
4397
4420
  "Set of rules to follow Relay specification for Edge types.",
4398
4421
  "",
@@ -4520,7 +4543,7 @@ var rule20 = {
4520
4543
  meta: {
4521
4544
  type: "problem",
4522
4545
  docs: {
4523
- category: "Schema",
4546
+ category: "schema",
4524
4547
  description: [
4525
4548
  "Set of rules to follow Relay specification for `PageInfo` object.",
4526
4549
  "",
@@ -4626,7 +4649,7 @@ var rule21 = {
4626
4649
  type: "suggestion",
4627
4650
  hasSuggestions: true,
4628
4651
  docs: {
4629
- category: "Schema",
4652
+ category: "schema",
4630
4653
  description: "Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.",
4631
4654
  url: "https://the-guild.dev/graphql/eslint/rules/require-deprecation-date",
4632
4655
  examples: [
@@ -4728,6 +4751,7 @@ var rule21 = {
4728
4751
  suggest: [
4729
4752
  {
4730
4753
  desc: `Remove \`${nodeName}\``,
4754
+ // @ts-expect-error -- fixme
4731
4755
  fix: (fixer) => fixer.remove(parent)
4732
4756
  }
4733
4757
  ]
@@ -4743,7 +4767,7 @@ var rule22 = {
4743
4767
  meta: {
4744
4768
  docs: {
4745
4769
  description: "Require all deprecation directives to specify a reason.",
4746
- category: "Schema",
4770
+ category: "schema",
4747
4771
  url: "https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason",
4748
4772
  recommended: true,
4749
4773
  examples: [
@@ -4862,7 +4886,7 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join("\n")}`
4862
4886
  var rule23 = {
4863
4887
  meta: {
4864
4888
  docs: {
4865
- category: "Schema",
4889
+ category: "schema",
4866
4890
  description: "Enforce descriptions in type definitions and operations.",
4867
4891
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID14}`,
4868
4892
  examples: [
@@ -4970,6 +4994,7 @@ var rule23 = {
4970
4994
  messages: {
4971
4995
  [RULE_ID14]: "Description is required for {{ nodeName }}"
4972
4996
  },
4997
+ // @ts-expect-error -- fixme
4973
4998
  schema: schema12
4974
4999
  },
4975
5000
  create(context) {
@@ -5033,7 +5058,7 @@ var rule24 = {
5033
5058
  meta: {
5034
5059
  type: "suggestion",
5035
5060
  docs: {
5036
- category: "Schema",
5061
+ category: "schema",
5037
5062
  description: "Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.\n> Currently, no errors are reported for result type `union`, `interface` and `scalar`.",
5038
5063
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID15}`,
5039
5064
  requiresSchema: true,
@@ -5110,7 +5135,7 @@ var rule25 = {
5110
5135
  meta: {
5111
5136
  type: "suggestion",
5112
5137
  docs: {
5113
- category: "Operations",
5138
+ category: "operations",
5114
5139
  description: "Require fragments to be imported via an import expression.",
5115
5140
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID16}`,
5116
5141
  examples: [
@@ -5218,6 +5243,7 @@ var rule25 = {
5218
5243
  suggest: suggestedFilePaths.map((suggestedPath) => ({
5219
5244
  messageId: SUGGESTION_ID,
5220
5245
  data: { fragmentName },
5246
+ // @ts-expect-error -- fixme
5221
5247
  fix: (fixer) => fixer.insertTextBeforeRange(
5222
5248
  [0, 0],
5223
5249
  `# import ${fragmentName} from '${suggestedPath}'
@@ -5237,7 +5263,7 @@ var rule26 = {
5237
5263
  meta: {
5238
5264
  type: "suggestion",
5239
5265
  docs: {
5240
- category: "Schema",
5266
+ category: "schema",
5241
5267
  description: "Require `input` or `type` fields to be non-nullable with `@oneOf` directive.",
5242
5268
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID17}`,
5243
5269
  examples: [
@@ -5304,7 +5330,7 @@ var rule27 = {
5304
5330
  type: "suggestion",
5305
5331
  hasSuggestions: true,
5306
5332
  docs: {
5307
- category: "Schema",
5333
+ category: "schema",
5308
5334
  description: "Require nullable fields in root types.",
5309
5335
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID18}`,
5310
5336
  requiresSchema: true,
@@ -5365,6 +5391,7 @@ var rule27 = {
5365
5391
  suggest: [
5366
5392
  {
5367
5393
  desc: `Make ${resultType} nullable`,
5394
+ // @ts-expect-error -- fixme
5368
5395
  fix(fixer) {
5369
5396
  const text = sourceCode.getText(field.gqlType);
5370
5397
  return fixer.replaceText(field.gqlType, text.replace("!", ""));
@@ -5420,7 +5447,7 @@ var rule28 = {
5420
5447
  type: "suggestion",
5421
5448
  hasSuggestions: true,
5422
5449
  docs: {
5423
- category: "Operations",
5450
+ category: "operations",
5424
5451
  description: "Enforce selecting specific fields when they are available on the GraphQL type.",
5425
5452
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID19}`,
5426
5453
  requiresSchema: true,
@@ -5481,6 +5508,7 @@ var rule28 = {
5481
5508
  messages: {
5482
5509
  [RULE_ID19]: "Field{{ pluralSuffix }} {{ fieldName }} must be selected when it's available on a type.\nInclude it in your selection set{{ addition }}."
5483
5510
  },
5511
+ // @ts-expect-error -- fixme
5484
5512
  schema: schema13
5485
5513
  },
5486
5514
  create(context) {
@@ -5586,13 +5614,14 @@ var rule28 = {
5586
5614
  const fieldName2 = englishJoinWords(
5587
5615
  idNames2.map((name) => `\`${(parent.alias || parent.name).value}.${name}\``)
5588
5616
  );
5589
- const pluralSuffix = idNames2.length > 1 ? "s" : "";
5590
- const addition = checkedFragmentSpreads.size === 0 ? "" : ` or add to used fragment${checkedFragmentSpreads.size > 1 ? "s" : ""} ${englishJoinWords([...checkedFragmentSpreads].map((name) => `\`${name}\``))}`;
5617
+ const addition = checkedFragmentSpreads.size === 0 ? "" : ` or add to used fragment${pluralize(
5618
+ checkedFragmentSpreads.size
5619
+ )} ${englishJoinWords([...checkedFragmentSpreads].map((name) => `\`${name}\``))}`;
5591
5620
  const problem = {
5592
5621
  loc,
5593
5622
  messageId: RULE_ID19,
5594
5623
  data: {
5595
- pluralSuffix,
5624
+ pluralSuffix: pluralize(idNames2.length),
5596
5625
  fieldName: fieldName2,
5597
5626
  addition
5598
5627
  }
@@ -5600,6 +5629,7 @@ var rule28 = {
5600
5629
  if ("type" in node) {
5601
5630
  problem.suggest = idNames2.map((idName) => ({
5602
5631
  desc: `Add \`${idName}\` selection`,
5632
+ // @ts-expect-error -- fixme
5603
5633
  fix: (fixer) => {
5604
5634
  let insertNode = node.selections[0];
5605
5635
  insertNode = insertNode.kind === Kind20.INLINE_FRAGMENT ? insertNode.selectionSet.selections[0] : insertNode;
@@ -5627,7 +5657,7 @@ var rule29 = {
5627
5657
  meta: {
5628
5658
  type: "suggestion",
5629
5659
  docs: {
5630
- category: "Schema",
5660
+ category: "schema",
5631
5661
  description: "Enforce types with `@oneOf` directive have `error` and `ok` fields.",
5632
5662
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID20}`,
5633
5663
  examples: [
@@ -5710,7 +5740,7 @@ var rule30 = {
5710
5740
  type: "suggestion",
5711
5741
  hasSuggestions: true,
5712
5742
  docs: {
5713
- category: "Operations",
5743
+ category: "operations",
5714
5744
  description: "Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).",
5715
5745
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID21}`,
5716
5746
  requiresSiblings: true,
@@ -5758,6 +5788,7 @@ var rule30 = {
5758
5788
  recommended: true,
5759
5789
  configOptions: [{ maxDepth: 7 }]
5760
5790
  },
5791
+ // @ts-expect-error -- fixme
5761
5792
  schema: schema14
5762
5793
  },
5763
5794
  create(context) {
@@ -5799,6 +5830,7 @@ var rule30 = {
5799
5830
  suggest: [
5800
5831
  {
5801
5832
  desc: "Remove selections",
5833
+ // @ts-expect-error -- fixme
5802
5834
  fix(fixer) {
5803
5835
  const sourceCode = context.getSourceCode();
5804
5836
  const foundNode = sourceCode.getNodeByRangeIndex(token.range[0]);
@@ -5864,7 +5896,7 @@ var rule31 = {
5864
5896
  type: "suggestion",
5865
5897
  docs: {
5866
5898
  description: "Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers.",
5867
- category: "Schema",
5899
+ category: "schema",
5868
5900
  recommended: true,
5869
5901
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID22}`,
5870
5902
  requiresSchema: true,
@@ -5936,6 +5968,7 @@ var rule31 = {
5936
5968
  }
5937
5969
  ]
5938
5970
  },
5971
+ // @ts-expect-error -- fixme
5939
5972
  schema: schema15
5940
5973
  },
5941
5974
  create(context) {
@@ -5969,13 +6002,11 @@ var rule31 = {
5969
6002
  return isValidIdName && isValidIdType;
5970
6003
  });
5971
6004
  if (validIds?.length !== 1) {
5972
- const pluralNamesSuffix = options.acceptedIdNames.length > 1 ? "s" : "";
5973
- const pluralTypesSuffix = options.acceptedIdTypes.length > 1 ? "s" : "";
5974
6005
  context.report({
5975
6006
  node: node.name,
5976
6007
  message: `${displayNodeName(node)} must have exactly one non-nullable unique identifier.
5977
- Accepted name${pluralNamesSuffix}: ${englishJoinWords(options.acceptedIdNames)}.
5978
- Accepted type${pluralTypesSuffix}: ${englishJoinWords(options.acceptedIdTypes)}.`
6008
+ Accepted name${pluralize(options.acceptedIdNames.length)}: ${englishJoinWords(options.acceptedIdNames)}.
6009
+ Accepted type${pluralize(options.acceptedIdTypes.length)}: ${englishJoinWords(options.acceptedIdTypes)}.`
5979
6010
  });
5980
6011
  }
5981
6012
  }
@@ -5991,7 +6022,7 @@ var rule32 = {
5991
6022
  hasSuggestions: true,
5992
6023
  docs: {
5993
6024
  url: "https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names",
5994
- category: "Schema",
6025
+ category: "schema",
5995
6026
  recommended: true,
5996
6027
  description: `A GraphQL enum type is only valid if all its values are uniquely named.
5997
6028
  > This rule disallows case-insensitive enum values duplicates too.`,
@@ -6043,6 +6074,7 @@ var rule32 = {
6043
6074
  suggest: [
6044
6075
  {
6045
6076
  desc: `Remove \`${enumName}\` enum value`,
6077
+ // @ts-expect-error -- fixme
6046
6078
  fix: (fixer) => fixer.remove(duplicate)
6047
6079
  }
6048
6080
  ]
@@ -6074,7 +6106,6 @@ var checkNode = (context, node, ruleId) => {
6074
6106
  documentName,
6075
6107
  summary: conflictingDocuments.map((f) => ` ${relative2(CWD, f.filePath.replace(VIRTUAL_DOCUMENT_REGEX, ""))}`).join("\n")
6076
6108
  },
6077
- // @ts-expect-error name will exist
6078
6109
  node: node.name
6079
6110
  });
6080
6111
  }
@@ -6083,7 +6114,7 @@ var rule33 = {
6083
6114
  meta: {
6084
6115
  type: "suggestion",
6085
6116
  docs: {
6086
- category: "Operations",
6117
+ category: "operations",
6087
6118
  description: "Enforce unique fragment names across your project.",
6088
6119
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID23}`,
6089
6120
  requiresSiblings: true,
@@ -6149,7 +6180,7 @@ var rule34 = {
6149
6180
  meta: {
6150
6181
  type: "suggestion",
6151
6182
  docs: {
6152
- category: "Operations",
6183
+ category: "operations",
6153
6184
  description: "Enforce unique operation names across your project.",
6154
6185
  url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID24}`,
6155
6186
  requiresSiblings: true,