@graphql-eslint/eslint-plugin 4.4.0-alpha-20241210130004-c86c74902285624344165bb32d972962226b7df8 → 4.4.0-alpha-20241210205144-662e65e39b519504be52c4dba23aaa08280b6322

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