@graphql-eslint/eslint-plugin 3.13.1-alpha-20221103065216-8fcfb42 → 3.13.1-alpha-20221103130705-abbda8b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +2 -2
  3. package/README.md +0 -266
  4. package/docs/README.md +0 -76
  5. package/docs/custom-rules.md +0 -148
  6. package/docs/deprecated-rules.md +0 -21
  7. package/docs/parser-options.md +0 -85
  8. package/docs/parser.md +0 -49
  9. package/docs/rules/alphabetize.md +0 -178
  10. package/docs/rules/description-style.md +0 -54
  11. package/docs/rules/executable-definitions.md +0 -17
  12. package/docs/rules/fields-on-correct-type.md +0 -17
  13. package/docs/rules/fragments-on-composite-type.md +0 -17
  14. package/docs/rules/input-name.md +0 -76
  15. package/docs/rules/known-argument-names.md +0 -17
  16. package/docs/rules/known-directives.md +0 -44
  17. package/docs/rules/known-fragment-names.md +0 -69
  18. package/docs/rules/known-type-names.md +0 -17
  19. package/docs/rules/lone-anonymous-operation.md +0 -17
  20. package/docs/rules/lone-schema-definition.md +0 -17
  21. package/docs/rules/match-document-filename.md +0 -156
  22. package/docs/rules/naming-convention.md +0 -300
  23. package/docs/rules/no-anonymous-operations.md +0 -39
  24. package/docs/rules/no-case-insensitive-enum-values-duplicates.md +0 -43
  25. package/docs/rules/no-deprecated.md +0 -85
  26. package/docs/rules/no-duplicate-fields.md +0 -65
  27. package/docs/rules/no-fragment-cycles.md +0 -17
  28. package/docs/rules/no-hashtag-description.md +0 -59
  29. package/docs/rules/no-root-type.md +0 -53
  30. package/docs/rules/no-scalar-result-type-on-mutation.md +0 -37
  31. package/docs/rules/no-typename-prefix.md +0 -39
  32. package/docs/rules/no-undefined-variables.md +0 -17
  33. package/docs/rules/no-unreachable-types.md +0 -49
  34. package/docs/rules/no-unused-fields.md +0 -62
  35. package/docs/rules/no-unused-fragments.md +0 -17
  36. package/docs/rules/no-unused-variables.md +0 -17
  37. package/docs/rules/one-field-subscriptions.md +0 -17
  38. package/docs/rules/overlapping-fields-can-be-merged.md +0 -17
  39. package/docs/rules/possible-fragment-spread.md +0 -17
  40. package/docs/rules/possible-type-extension.md +0 -15
  41. package/docs/rules/provided-required-arguments.md +0 -17
  42. package/docs/rules/relay-arguments.md +0 -57
  43. package/docs/rules/relay-connection-types.md +0 -42
  44. package/docs/rules/relay-edge-types.md +0 -56
  45. package/docs/rules/relay-page-info.md +0 -32
  46. package/docs/rules/require-deprecation-date.md +0 -57
  47. package/docs/rules/require-deprecation-reason.md +0 -47
  48. package/docs/rules/require-description.md +0 -115
  49. package/docs/rules/require-field-of-type-query-in-mutation-result.md +0 -47
  50. package/docs/rules/require-id-when-available.md +0 -88
  51. package/docs/rules/scalar-leafs.md +0 -17
  52. package/docs/rules/selection-set-depth.md +0 -76
  53. package/docs/rules/strict-id-in-types.md +0 -130
  54. package/docs/rules/unique-argument-names.md +0 -17
  55. package/docs/rules/unique-directive-names-per-location.md +0 -17
  56. package/docs/rules/unique-directive-names.md +0 -17
  57. package/docs/rules/unique-enum-value-names.md +0 -15
  58. package/docs/rules/unique-field-definition-names.md +0 -17
  59. package/docs/rules/unique-fragment-name.md +0 -51
  60. package/docs/rules/unique-input-field-names.md +0 -17
  61. package/docs/rules/unique-operation-name.md +0 -55
  62. package/docs/rules/unique-operation-types.md +0 -17
  63. package/docs/rules/unique-type-names.md +0 -17
  64. package/docs/rules/unique-variable-names.md +0 -17
  65. package/docs/rules/value-literals-of-correct-type.md +0 -17
  66. package/docs/rules/variables-are-input-types.md +0 -17
  67. package/docs/rules/variables-in-allowed-position.md +0 -17
@@ -1,51 +0,0 @@
1
- # `unique-fragment-name`
2
-
3
- - Category: `Operations`
4
- - Rule name: `@graphql-eslint/unique-fragment-name`
5
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
6
- - Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
7
-
8
- Enforce unique fragment names across your project.
9
-
10
- ## Usage Examples
11
-
12
- ### Incorrect
13
-
14
- ```graphql
15
- # eslint @graphql-eslint/unique-fragment-name: 'error'
16
-
17
- # user.fragment.graphql
18
- fragment UserFields on User {
19
- id
20
- name
21
- fullName
22
- }
23
-
24
- # user-fields.graphql
25
- fragment UserFields on User {
26
- id
27
- }
28
- ```
29
-
30
- ### Correct
31
-
32
- ```graphql
33
- # eslint @graphql-eslint/unique-fragment-name: 'error'
34
-
35
- # user.fragment.graphql
36
- fragment AllUserFields on User {
37
- id
38
- name
39
- fullName
40
- }
41
-
42
- # user-fields.graphql
43
- fragment UserFields on User {
44
- id
45
- }
46
- ```
47
-
48
- ## Resources
49
-
50
- - [Rule source](../../packages/plugin/src/rules/unique-fragment-name.ts)
51
- - [Test source](../../packages/plugin/tests/unique-fragment-name.spec.ts)
@@ -1,17 +0,0 @@
1
- # `unique-input-field-names`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Operations`
6
- - Rule name: `@graphql-eslint/unique-input-field-names`
7
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL input object value is only valid if all supplied fields are uniquely named.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
13
-
14
- ## Resources
15
-
16
- - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueInputFieldNamesRule.ts)
17
- - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts)
@@ -1,55 +0,0 @@
1
- # `unique-operation-name`
2
-
3
- - Category: `Operations`
4
- - Rule name: `@graphql-eslint/unique-operation-name`
5
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
6
- - Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
7
-
8
- Enforce unique operation names across your project.
9
-
10
- ## Usage Examples
11
-
12
- ### Incorrect
13
-
14
- ```graphql
15
- # eslint @graphql-eslint/unique-operation-name: 'error'
16
-
17
- # foo.query.graphql
18
- query user {
19
- user {
20
- id
21
- }
22
- }
23
-
24
- # bar.query.graphql
25
- query user {
26
- me {
27
- id
28
- }
29
- }
30
- ```
31
-
32
- ### Correct
33
-
34
- ```graphql
35
- # eslint @graphql-eslint/unique-operation-name: 'error'
36
-
37
- # foo.query.graphql
38
- query user {
39
- user {
40
- id
41
- }
42
- }
43
-
44
- # bar.query.graphql
45
- query me {
46
- me {
47
- id
48
- }
49
- }
50
- ```
51
-
52
- ## Resources
53
-
54
- - [Rule source](../../packages/plugin/src/rules/unique-operation-name.ts)
55
- - [Test source](../../packages/plugin/tests/unique-operation-name.spec.ts)
@@ -1,17 +0,0 @@
1
- # `unique-operation-types`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Schema`
6
- - Rule name: `@graphql-eslint/unique-operation-types`
7
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL document is only valid if it has only one type per operation.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
13
-
14
- ## Resources
15
-
16
- - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueOperationTypesRule.ts)
17
- - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/UniqueOperationTypesRule-test.ts)
@@ -1,17 +0,0 @@
1
- # `unique-type-names`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Schema`
6
- - Rule name: `@graphql-eslint/unique-type-names`
7
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL document is only valid if all defined types have unique names.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
13
-
14
- ## Resources
15
-
16
- - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueTypeNamesRule.ts)
17
- - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/UniqueTypeNamesRule-test.ts)
@@ -1,17 +0,0 @@
1
- # `unique-variable-names`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Operations`
6
- - Rule name: `@graphql-eslint/unique-variable-names`
7
- - Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL operation is only valid if all its variables are uniquely named.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
13
-
14
- ## Resources
15
-
16
- - [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueVariableNamesRule.ts)
17
- - [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/UniqueVariableNamesRule-test.ts)
@@ -1,17 +0,0 @@
1
- # `value-literals-of-correct-type`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Operations`
6
- - Rule name: `@graphql-eslint/value-literals-of-correct-type`
7
- - Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL document is only valid if all value literals are of the type expected at their position.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
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)
@@ -1,17 +0,0 @@
1
- # `variables-are-input-types`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Operations`
6
- - Rule name: `@graphql-eslint/variables-are-input-types`
7
- - Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
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)
@@ -1,17 +0,0 @@
1
- # `variables-in-allowed-position`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
4
-
5
- - Category: `Operations`
6
- - Rule name: `@graphql-eslint/variables-in-allowed-position`
7
- - Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
8
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
9
-
10
- Variables passed to field arguments conform to type.
11
-
12
- > This rule is a wrapper around a `graphql-js` validation function.
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)