@graphql-eslint/eslint-plugin 2.3.0-alpha-6ba4002.0 → 2.3.2-alpha-99be3d2.0

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 (70) hide show
  1. package/README.md +1 -1
  2. package/configs/all.d.ts +7 -0
  3. package/configs/index.d.ts +7 -0
  4. package/docs/README.md +2 -1
  5. package/docs/custom-rules.md +3 -3
  6. package/docs/rules/alphabetize.md +145 -0
  7. package/docs/rules/avoid-duplicate-fields.md +6 -1
  8. package/docs/rules/avoid-operation-name-prefix.md +8 -8
  9. package/docs/rules/avoid-scalar-result-type-on-mutation.md +6 -1
  10. package/docs/rules/avoid-typename-prefix.md +6 -1
  11. package/docs/rules/description-style.md +10 -9
  12. package/docs/rules/executable-definitions.md +6 -1
  13. package/docs/rules/fields-on-correct-type.md +6 -1
  14. package/docs/rules/fragments-on-composite-type.md +6 -1
  15. package/docs/rules/input-name.md +11 -10
  16. package/docs/rules/known-argument-names.md +6 -1
  17. package/docs/rules/known-directives.md +6 -1
  18. package/docs/rules/known-fragment-names.md +6 -1
  19. package/docs/rules/known-type-names.md +6 -1
  20. package/docs/rules/lone-anonymous-operation.md +6 -1
  21. package/docs/rules/lone-schema-definition.md +6 -1
  22. package/docs/rules/match-document-filename.md +12 -11
  23. package/docs/rules/naming-convention.md +21 -20
  24. package/docs/rules/no-anonymous-operations.md +6 -1
  25. package/docs/rules/no-case-insensitive-enum-values-duplicates.md +5 -1
  26. package/docs/rules/no-deprecated.md +6 -1
  27. package/docs/rules/no-fragment-cycles.md +6 -1
  28. package/docs/rules/no-hashtag-description.md +6 -1
  29. package/docs/rules/no-operation-name-suffix.md +5 -1
  30. package/docs/rules/no-undefined-variables.md +6 -1
  31. package/docs/rules/no-unreachable-types.md +6 -1
  32. package/docs/rules/no-unused-fields.md +6 -1
  33. package/docs/rules/no-unused-fragments.md +6 -1
  34. package/docs/rules/no-unused-variables.md +6 -1
  35. package/docs/rules/one-field-subscriptions.md +6 -1
  36. package/docs/rules/overlapping-fields-can-be-merged.md +6 -1
  37. package/docs/rules/possible-fragment-spread.md +6 -1
  38. package/docs/rules/possible-type-extension.md +6 -1
  39. package/docs/rules/provided-required-arguments.md +6 -1
  40. package/docs/rules/require-deprecation-date.md +5 -4
  41. package/docs/rules/require-deprecation-reason.md +6 -1
  42. package/docs/rules/require-description.md +5 -8
  43. package/docs/rules/require-field-of-type-query-in-mutation-result.md +6 -1
  44. package/docs/rules/require-id-when-available.md +6 -5
  45. package/docs/rules/scalar-leafs.md +6 -1
  46. package/docs/rules/selection-set-depth.md +6 -9
  47. package/docs/rules/strict-id-in-types.md +12 -11
  48. package/docs/rules/unique-argument-names.md +6 -1
  49. package/docs/rules/unique-directive-names-per-location.md +6 -1
  50. package/docs/rules/unique-directive-names.md +6 -1
  51. package/docs/rules/unique-enum-value-names.md +6 -1
  52. package/docs/rules/unique-field-definition-names.md +6 -1
  53. package/docs/rules/unique-fragment-name.md +6 -1
  54. package/docs/rules/unique-input-field-names.md +6 -1
  55. package/docs/rules/unique-operation-name.md +6 -1
  56. package/docs/rules/unique-operation-types.md +6 -1
  57. package/docs/rules/unique-type-names.md +6 -1
  58. package/docs/rules/unique-variable-names.md +6 -1
  59. package/docs/rules/value-literals-of-correct-type.md +6 -1
  60. package/docs/rules/variables-are-input-types.md +6 -1
  61. package/docs/rules/variables-in-allowed-position.md +6 -1
  62. package/estree-parser/estree-ast.d.ts +2 -2
  63. package/index.js +466 -102
  64. package/index.mjs +466 -102
  65. package/package.json +1 -1
  66. package/rules/alphabetize.d.ts +17 -0
  67. package/rules/index.d.ts +7 -0
  68. package/testkit.d.ts +6 -4
  69. package/types.d.ts +3 -0
  70. package/utils.d.ts +4 -0
@@ -9,4 +9,9 @@
9
9
 
10
10
  A GraphQL document is only valid if all value literals are of the type expected at their position.
11
11
 
12
- > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ValuesOfCorrectTypeRule.ts).
12
+ > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ValuesOfCorrectTypeRule.ts).
13
+
14
+ ## Resources
15
+
16
+ - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ValuesOfCorrectTypeRule.ts)
17
+ - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts)
@@ -9,4 +9,9 @@
9
9
 
10
10
  A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
11
11
 
12
- > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesAreInputTypesRule.ts).
12
+ > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesAreInputTypesRule.ts).
13
+
14
+ ## Resources
15
+
16
+ - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesAreInputTypesRule.ts)
17
+ - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/VariablesAreInputTypesRule-test.ts)
@@ -9,4 +9,9 @@
9
9
 
10
10
  Variables passed to field arguments conform to type.
11
11
 
12
- > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesInAllowedPositionRule.ts).
12
+ > This rule is a wrapper around a `graphql-js` validation function. [You can find its source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesInAllowedPositionRule.ts).
13
+
14
+ ## Resources
15
+
16
+ - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesInAllowedPositionRule.ts)
17
+ - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts)
@@ -5,7 +5,7 @@ export declare type SafeGraphQLType<T extends ASTNode | ValueNode> = Omit<T exte
5
5
  } ? Omit<T, 'type'> & {
6
6
  readonly gqlType: TypeNode;
7
7
  } : T, 'loc'>;
8
- export declare type SingleESTreeNode<T extends any, WithTypeInfo extends boolean> = T extends ASTNode | ValueNode ? SafeGraphQLType<T> & Pick<BaseNode, 'leadingComments' | 'loc' | 'range'> & {
8
+ export declare type SingleESTreeNode<T, WithTypeInfo extends boolean> = T extends ASTNode | ValueNode ? SafeGraphQLType<T> & Pick<BaseNode, 'leadingComments' | 'loc' | 'range'> & {
9
9
  type: T['kind'];
10
10
  gqlLocation: Location;
11
11
  } & (WithTypeInfo extends true ? {
@@ -21,7 +21,7 @@ export declare type SingleESTreeNode<T extends any, WithTypeInfo extends boolean
21
21
  gqlType?: ReturnType<TypeInfo['getType']>;
22
22
  };
23
23
  } : {}) : T;
24
- export declare type GraphQLESTreeNode<T extends any, WithTypeInfo extends boolean = false> = T extends ASTNode | ValueNode ? {
24
+ export declare type GraphQLESTreeNode<T, WithTypeInfo extends boolean = false> = T extends ASTNode | ValueNode ? {
25
25
  rawNode: () => T;
26
26
  } & {
27
27
  [K in keyof SingleESTreeNode<T, WithTypeInfo>]: SingleESTreeNode<T, WithTypeInfo>[K] extends ReadonlyArray<infer Nested> ? GraphQLESTreeNode<Nested, WithTypeInfo>[] : SingleESTreeNode<T, WithTypeInfo>[K] extends ASTNode ? GraphQLESTreeNode<SingleESTreeNode<T, WithTypeInfo>[K], WithTypeInfo> : SingleESTreeNode<T, WithTypeInfo>[K];