@graphql-eslint/eslint-plugin 3.0.0-alpha-7462f3d.0 → 3.0.0-alpha-698204a.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.
- package/README.md +19 -8
- package/configs/base.d.ts +5 -0
- package/configs/index.d.ts +58 -92
- package/configs/operations-all.d.ts +19 -0
- package/configs/{recommended.d.ts → operations-recommended.d.ts} +11 -29
- package/configs/schema-all.d.ts +23 -0
- package/configs/schema-recommended.d.ts +44 -0
- package/docs/README.md +7 -13
- package/docs/rules/alphabetize.md +1 -1
- package/docs/rules/description-style.md +4 -2
- package/docs/rules/executable-definitions.md +2 -2
- package/docs/rules/fields-on-correct-type.md +2 -2
- package/docs/rules/fragments-on-composite-type.md +2 -2
- package/docs/rules/input-name.md +1 -1
- package/docs/rules/known-argument-names.md +2 -2
- package/docs/rules/known-directives.md +2 -2
- package/docs/rules/known-fragment-names.md +2 -2
- package/docs/rules/known-type-names.md +2 -2
- package/docs/rules/lone-anonymous-operation.md +2 -2
- package/docs/rules/lone-schema-definition.md +2 -2
- package/docs/rules/match-document-filename.md +6 -4
- package/docs/rules/naming-convention.md +2 -3
- package/docs/rules/no-anonymous-operations.md +2 -2
- package/docs/rules/no-case-insensitive-enum-values-duplicates.md +2 -2
- package/docs/rules/no-deprecated.md +3 -1
- package/docs/rules/no-duplicate-fields.md +3 -1
- package/docs/rules/no-fragment-cycles.md +2 -2
- package/docs/rules/no-hashtag-description.md +3 -1
- package/docs/rules/no-root-type.md +1 -1
- package/docs/rules/no-scalar-result-type-on-mutation.md +1 -1
- package/docs/rules/no-typename-prefix.md +2 -2
- package/docs/rules/no-undefined-variables.md +2 -2
- package/docs/rules/no-unreachable-types.md +3 -1
- package/docs/rules/no-unused-fields.md +1 -1
- package/docs/rules/no-unused-fragments.md +2 -2
- package/docs/rules/no-unused-variables.md +2 -2
- package/docs/rules/one-field-subscriptions.md +2 -2
- package/docs/rules/overlapping-fields-can-be-merged.md +2 -2
- package/docs/rules/possible-fragment-spread.md +2 -2
- package/docs/rules/possible-type-extension.md +2 -2
- package/docs/rules/provided-required-arguments.md +2 -2
- package/docs/rules/require-deprecation-date.md +1 -1
- package/docs/rules/require-deprecation-reason.md +2 -2
- package/docs/rules/require-description.md +1 -1
- package/docs/rules/require-field-of-type-query-in-mutation-result.md +1 -1
- package/docs/rules/require-id-when-available.md +3 -1
- package/docs/rules/scalar-leafs.md +2 -2
- package/docs/rules/selection-set-depth.md +9 -2
- package/docs/rules/strict-id-in-types.md +16 -10
- package/docs/rules/unique-argument-names.md +2 -2
- package/docs/rules/unique-directive-names-per-location.md +2 -2
- package/docs/rules/unique-directive-names.md +2 -2
- package/docs/rules/unique-enum-value-names.md +2 -2
- package/docs/rules/unique-field-definition-names.md +2 -2
- package/docs/rules/unique-fragment-name.md +1 -1
- package/docs/rules/unique-input-field-names.md +2 -2
- package/docs/rules/unique-operation-name.md +1 -1
- package/docs/rules/unique-operation-types.md +2 -2
- package/docs/rules/unique-type-names.md +2 -2
- package/docs/rules/unique-variable-names.md +2 -2
- package/docs/rules/value-literals-of-correct-type.md +2 -2
- package/docs/rules/variables-are-input-types.md +2 -2
- package/docs/rules/variables-in-allowed-position.md +2 -2
- package/index.js +246 -136
- package/index.mjs +246 -136
- package/package.json +1 -1
- package/rules/alphabetize.d.ts +8 -10
- package/rules/description-style.d.ts +4 -6
- package/rules/index.d.ts +2 -2
- package/rules/input-name.d.ts +1 -1
- package/rules/match-document-filename.d.ts +8 -10
- package/rules/naming-convention.d.ts +1 -1
- package/rules/require-id-when-available.d.ts +3 -3
- package/rules/selection-set-depth.d.ts +3 -3
- package/rules/strict-id-in-types.d.ts +6 -8
- package/types.d.ts +9 -5
- package/configs/all.d.ts +0 -102
@@ -1,8 +1,8 @@
|
|
1
1
|
# `lone-schema-definition`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/lone-schema-definition`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `match-document-filename`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Operations`
|
4
4
|
- Rule name: `@graphql-eslint/match-document-filename`
|
5
5
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -88,7 +88,7 @@ query UserById {
|
|
88
88
|
|
89
89
|
The schema defines the following properties:
|
90
90
|
|
91
|
-
### `fileExtension` (
|
91
|
+
### `fileExtension` (enum)
|
92
92
|
|
93
93
|
This element must be one of the following enum values:
|
94
94
|
|
@@ -129,7 +129,7 @@ The object must be one of the following types:
|
|
129
129
|
|
130
130
|
The schema defines the following additional types:
|
131
131
|
|
132
|
-
## `asString` (
|
132
|
+
## `asString` (enum)
|
133
133
|
|
134
134
|
One of: `camelCase`, `PascalCase`, `snake_case`, `UPPER_CASE`, `kebab-case`
|
135
135
|
|
@@ -137,7 +137,7 @@ One of: `camelCase`, `PascalCase`, `snake_case`, `UPPER_CASE`, `kebab-case`
|
|
137
137
|
|
138
138
|
Properties of the `asObject` object:
|
139
139
|
|
140
|
-
### `style` (
|
140
|
+
### `style` (enum)
|
141
141
|
|
142
142
|
This element must be one of the following enum values:
|
143
143
|
|
@@ -147,6 +147,8 @@ This element must be one of the following enum values:
|
|
147
147
|
- `UPPER_CASE`
|
148
148
|
- `kebab-case`
|
149
149
|
|
150
|
+
### `suffix` (string)
|
151
|
+
|
150
152
|
## Resources
|
151
153
|
|
152
154
|
- [Rule source](../../packages/plugin/src/rules/match-document-filename.ts)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `naming-convention`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` and `"plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema & Operations`
|
6
6
|
- Rule name: `@graphql-eslint/naming-convention`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -57,7 +57,6 @@ Includes:
|
|
57
57
|
|
58
58
|
- [FieldDefinition](https://spec.graphql.org/October2021/#FieldDefinition)
|
59
59
|
- [InputValueDefinition](https://spec.graphql.org/October2021/#InputValueDefinition)
|
60
|
-
- [VariableDefinition](https://spec.graphql.org/October2021/#VariableDefinition)
|
61
60
|
- [Argument](https://spec.graphql.org/October2021/#Argument)
|
62
61
|
- [DirectiveDefinition](https://spec.graphql.org/October2021/#DirectiveDefinition)
|
63
62
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-anonymous-operations`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/no-anonymous-operations`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# `no-case-insensitive-enum-values-duplicates`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
5
|
🔧 The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule.
|
6
6
|
|
7
|
-
- Category: `
|
7
|
+
- Category: `Schema`
|
8
8
|
- Rule name: `@graphql-eslint/no-case-insensitive-enum-values-duplicates`
|
9
9
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
10
10
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# `no-deprecated`
|
2
2
|
|
3
|
-
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
5
|
+
- Category: `Operations`
|
4
6
|
- Rule name: `@graphql-eslint/no-deprecated`
|
5
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# `no-duplicate-fields`
|
2
2
|
|
3
|
-
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
5
|
+
- Category: `Operations`
|
4
6
|
- Rule name: `@graphql-eslint/no-duplicate-fields`
|
5
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-fragment-cycles`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/no-fragment-cycles`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# `no-hashtag-description`
|
2
2
|
|
3
|
-
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
5
|
+
- Category: `Schema`
|
4
6
|
- Rule name: `@graphql-eslint/no-hashtag-description`
|
5
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `no-root-type`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Schema`
|
4
4
|
- Rule name: `@graphql-eslint/no-root-type`
|
5
5
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `no-scalar-result-type-on-mutation`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Schema`
|
4
4
|
- Rule name: `@graphql-eslint/no-scalar-result-type-on-mutation`
|
5
5
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-typename-prefix`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/no-typename-prefix`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-undefined-variables`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/no-undefined-variables`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,10 @@
|
|
1
1
|
# `no-unreachable-types`
|
2
2
|
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
3
5
|
🔧 The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule.
|
4
6
|
|
5
|
-
- Category: `
|
7
|
+
- Category: `Schema`
|
6
8
|
- Rule name: `@graphql-eslint/no-unreachable-types`
|
7
9
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
10
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
🔧 The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/no-unused-fields`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-unused-fragments`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/no-unused-fragments`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `no-unused-variables`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/no-unused-variables`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `one-field-subscriptions`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/one-field-subscriptions`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `overlapping-fields-can-be-merged`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/overlapping-fields-can-be-merged`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `possible-fragment-spread`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/possible-fragment-spread`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `possible-type-extension`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/possible-type-extension`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `provided-required-arguments`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` and `"plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema & Operations`
|
6
6
|
- Rule name: `@graphql-eslint/provided-required-arguments`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `require-deprecation-date`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Schema`
|
4
4
|
- Rule name: `@graphql-eslint/require-deprecation-date`
|
5
5
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `require-deprecation-reason`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/require-deprecation-reason`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `require-description`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Schema`
|
4
4
|
- Rule name: `@graphql-eslint/require-description`
|
5
5
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `require-field-of-type-query-in-mutation-result`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Schema`
|
4
4
|
- Rule name: `@graphql-eslint/require-field-of-type-query-in-mutation-result`
|
5
5
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# `require-id-when-available`
|
2
2
|
|
3
|
-
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
5
|
+
- Category: `Operations`
|
4
6
|
- Rule name: `@graphql-eslint/require-id-when-available`
|
5
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
8
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `scalar-leafs`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/scalar-leafs`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# `selection-set-depth`
|
2
2
|
|
3
|
-
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
|
+
|
5
|
+
- Category: `Operations`
|
4
6
|
- Rule name: `@graphql-eslint/selection-set-depth`
|
5
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
8
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -55,12 +57,17 @@ query deep2 {
|
|
55
57
|
|
56
58
|
The schema defines the following properties:
|
57
59
|
|
58
|
-
### `maxDepth` (number)
|
60
|
+
### `maxDepth` (number, required)
|
59
61
|
|
60
62
|
### `ignore` (array)
|
61
63
|
|
62
64
|
The object is an array with all elements of the type `string`.
|
63
65
|
|
66
|
+
Additional restrictions:
|
67
|
+
|
68
|
+
* Minimum items: `1`
|
69
|
+
* Unique items: `true`
|
70
|
+
|
64
71
|
## Resources
|
65
72
|
|
66
73
|
- [Rule source](../../packages/plugin/src/rules/selection-set-depth.ts)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `strict-id-in-types`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/strict-id-in-types`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -76,6 +76,10 @@ Default:
|
|
76
76
|
]
|
77
77
|
```
|
78
78
|
|
79
|
+
Additional restrictions:
|
80
|
+
|
81
|
+
* Unique items: `true`
|
82
|
+
|
79
83
|
### `acceptedIdTypes` (array)
|
80
84
|
|
81
85
|
The object is an array with all elements of the type `string`.
|
@@ -88,6 +92,10 @@ Default:
|
|
88
92
|
]
|
89
93
|
```
|
90
94
|
|
95
|
+
Additional restrictions:
|
96
|
+
|
97
|
+
* Unique items: `true`
|
98
|
+
|
91
99
|
### `exceptions` (object)
|
92
100
|
|
93
101
|
Properties of the `exceptions` object:
|
@@ -98,11 +106,10 @@ This is used to exclude types with names that match one of the specified values.
|
|
98
106
|
|
99
107
|
The object is an array with all elements of the type `string`.
|
100
108
|
|
101
|
-
|
109
|
+
Additional restrictions:
|
102
110
|
|
103
|
-
|
104
|
-
|
105
|
-
```
|
111
|
+
* Minimum items: `1`
|
112
|
+
* Unique items: `true`
|
106
113
|
|
107
114
|
#### `suffixes` (array)
|
108
115
|
|
@@ -110,11 +117,10 @@ This is used to exclude types with names with suffixes that match one of the spe
|
|
110
117
|
|
111
118
|
The object is an array with all elements of the type `string`.
|
112
119
|
|
113
|
-
|
120
|
+
Additional restrictions:
|
114
121
|
|
115
|
-
|
116
|
-
|
117
|
-
```
|
122
|
+
* Minimum items: `1`
|
123
|
+
* Unique items: `true`
|
118
124
|
|
119
125
|
## Resources
|
120
126
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-argument-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/unique-argument-names`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-directive-names-per-location`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` and `"plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema & Operations`
|
6
6
|
- Rule name: `@graphql-eslint/unique-directive-names-per-location`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-directive-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/unique-directive-names`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-enum-value-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/unique-enum-value-names`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-field-definition-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/unique-field-definition-names`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `unique-fragment-name`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Operations`
|
4
4
|
- Rule name: `@graphql-eslint/unique-fragment-name`
|
5
5
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-input-field-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/unique-input-field-names`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# `unique-operation-name`
|
2
2
|
|
3
|
-
- Category: `
|
3
|
+
- Category: `Operations`
|
4
4
|
- Rule name: `@graphql-eslint/unique-operation-name`
|
5
5
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
6
6
|
- Requires GraphQL Operations: `true` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-operation-types`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/unique-operation-types`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-type-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Schema`
|
6
6
|
- Rule name: `@graphql-eslint/unique-type-names`
|
7
7
|
- Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `unique-variable-names`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/unique-variable-names`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `value-literals-of-correct-type`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/value-literals-of-correct-type`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `variables-are-input-types`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/variables-are-input-types`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# `variables-in-allowed-position`
|
2
2
|
|
3
|
-
✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
|
3
|
+
✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule.
|
4
4
|
|
5
|
-
- Category: `
|
5
|
+
- Category: `Operations`
|
6
6
|
- Rule name: `@graphql-eslint/variables-in-allowed-position`
|
7
7
|
- Requires GraphQL Schema: `true` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
|
8
8
|
- Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|