@graphql-eslint/eslint-plugin 2.1.0-alpha-b4cd82d.0 → 2.3.0-alpha-6ba4002.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 (58) hide show
  1. package/README.md +38 -18
  2. package/configs/all.d.ts +61 -0
  3. package/configs/index.d.ts +107 -0
  4. package/configs/recommended.d.ts +44 -0
  5. package/docs/README.md +64 -60
  6. package/docs/rules/avoid-scalar-result-type-on-mutation.md +30 -0
  7. package/docs/rules/avoid-typename-prefix.md +2 -0
  8. package/docs/rules/executable-definitions.md +3 -1
  9. package/docs/rules/fields-on-correct-type.md +3 -1
  10. package/docs/rules/fragments-on-composite-type.md +3 -1
  11. package/docs/rules/known-argument-names.md +3 -1
  12. package/docs/rules/known-directives.md +3 -1
  13. package/docs/rules/known-fragment-names.md +3 -1
  14. package/docs/rules/known-type-names.md +3 -1
  15. package/docs/rules/lone-anonymous-operation.md +3 -1
  16. package/docs/rules/lone-schema-definition.md +3 -1
  17. package/docs/rules/match-document-filename.md +1 -1
  18. package/docs/rules/naming-convention.md +2 -0
  19. package/docs/rules/no-anonymous-operations.md +2 -0
  20. package/docs/rules/no-case-insensitive-enum-values-duplicates.md +5 -1
  21. package/docs/rules/no-fragment-cycles.md +3 -1
  22. package/docs/rules/no-operation-name-suffix.md +4 -0
  23. package/docs/rules/no-undefined-variables.md +3 -1
  24. package/docs/rules/no-unreachable-types.md +2 -0
  25. package/docs/rules/no-unused-fields.md +2 -0
  26. package/docs/rules/no-unused-fragments.md +3 -1
  27. package/docs/rules/no-unused-variables.md +3 -1
  28. package/docs/rules/one-field-subscriptions.md +3 -1
  29. package/docs/rules/overlapping-fields-can-be-merged.md +3 -1
  30. package/docs/rules/possible-fragment-spread.md +3 -1
  31. package/docs/rules/possible-type-extension.md +3 -1
  32. package/docs/rules/provided-required-arguments.md +3 -1
  33. package/docs/rules/require-deprecation-date.md +53 -0
  34. package/docs/rules/require-deprecation-reason.md +2 -0
  35. package/docs/rules/require-field-of-type-query-in-mutation-result.md +42 -0
  36. package/docs/rules/scalar-leafs.md +3 -1
  37. package/docs/rules/strict-id-in-types.md +2 -0
  38. package/docs/rules/unique-argument-names.md +3 -1
  39. package/docs/rules/unique-directive-names-per-location.md +3 -1
  40. package/docs/rules/unique-directive-names.md +3 -1
  41. package/docs/rules/unique-enum-value-names.md +3 -1
  42. package/docs/rules/unique-field-definition-names.md +3 -1
  43. package/docs/rules/unique-input-field-names.md +3 -1
  44. package/docs/rules/unique-operation-types.md +3 -1
  45. package/docs/rules/unique-type-names.md +3 -1
  46. package/docs/rules/unique-variable-names.md +3 -1
  47. package/docs/rules/value-literals-of-correct-type.md +3 -1
  48. package/docs/rules/variables-are-input-types.md +3 -1
  49. package/docs/rules/variables-in-allowed-position.md +3 -1
  50. package/index.d.ts +1 -0
  51. package/index.js +389 -74
  52. package/index.mjs +390 -76
  53. package/package.json +1 -1
  54. package/rules/avoid-scalar-result-type-on-mutation.d.ts +3 -0
  55. package/rules/index.d.ts +5 -0
  56. package/rules/require-deprecation-date.d.ts +5 -0
  57. package/rules/require-field-of-type-query-in-mutation-result.d.ts +3 -0
  58. package/utils.d.ts +9 -4
package/README.md CHANGED
@@ -32,13 +32,13 @@ This project integrates GraphQL and ESLint, for a better developer experience.
32
32
 
33
33
  Start by installing the plugin package, which includes everything you need:
34
34
 
35
- ```
35
+ ```sh
36
36
  yarn add -D @graphql-eslint/eslint-plugin
37
37
  ```
38
38
 
39
39
  Or, with NPM:
40
40
 
41
- ```
41
+ ```sh
42
42
  npm install --save-dev @graphql-eslint/eslint-plugin
43
43
  ```
44
44
 
@@ -46,8 +46,6 @@ npm install --save-dev @graphql-eslint/eslint-plugin
46
46
 
47
47
  ### Configuration
48
48
 
49
- > Note: This plugin doesn't activate any rule by default at the moment, we are currently thinking of the right rules to be the "recommended" and the default set. Until then, please make sure to active rules based on your needs.
50
-
51
49
  To get started, create an override configuration for your ESLint, while applying it to to `.graphql` files (do that even if you are declaring your operations in code files):
52
50
 
53
51
  ```json
@@ -166,7 +164,36 @@ You can find a list of [ESLint directives here](https://eslint.org/docs/2.13.1/u
166
164
 
167
165
  You can find a complete list of [all available rules here](./docs/README.md)
168
166
 
169
- > This repo doesn't exports a "recommended" set of rules - feel free to recommend us!
167
+ ## Available Configs
168
+
169
+ This plugin exports a [`recommended` config](packages/plugin/src/configs/recommended.ts) that enforces good practices and an [`all` config](packages/plugin/src/configs/all.ts) that makes use of all rules (except for deprecated ones).
170
+
171
+ Enable it in your `.eslintrc` file with the `extends` option.
172
+
173
+ > These configs under the hood set `parser` as `@graphql-eslint/eslint-plugin` and add `@graphql-eslint` to `plugins` array, so you don't need to specify them.
174
+
175
+ ```diff
176
+ {
177
+ "overrides": [
178
+ {
179
+ "files": ["*.js"],
180
+ "processor": "@graphql-eslint/graphql",
181
+ "rules": {
182
+ // your rules for JavaScript files
183
+ }
184
+ },
185
+ {
186
+ "files": ["*.graphql"],
187
+ - "parser": "@graphql-eslint/eslint-plugin",
188
+ - "plugins": ["@graphql-eslint"],
189
+ + "extends": "plugin:@graphql-eslint/recommended", // or plugin:@graphql-eslint/all
190
+ "rules": {
191
+ // your rules for GraphQL files
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ ```
170
197
 
171
198
  ### `prettier` rule
172
199
 
@@ -179,23 +206,16 @@ All you need to do is like the following for now:
179
206
  module.exports = {
180
207
  overrides: [
181
208
  {
182
- files: ['*.tsx', '*.ts', '*.jsx', '*.js'],
209
+ files: ['*.js'],
183
210
  processor: '@graphql-eslint/graphql',
211
+ extends: ['plugin:prettier/recommended'],
184
212
  },
185
213
  {
186
214
  files: ['*.graphql'],
187
215
  parser: '@graphql-eslint/eslint-plugin',
188
216
  plugins: ['@graphql-eslint'],
189
- // the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily
190
- // after https://github.com/prettier/eslint-plugin-prettier/pull/413
191
- // been merged and released, it can be deleted safely
192
217
  rules: {
193
- 'prettier/prettier': [
194
- 2,
195
- {
196
- parser: 'graphql',
197
- },
198
- ],
218
+ 'prettier/prettier': 'error',
199
219
  },
200
220
  },
201
221
  // the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily
@@ -204,8 +224,8 @@ module.exports = {
204
224
  {
205
225
  files: ['*.js/*.graphql'],
206
226
  rules: {
207
- 'prettier/prettier': 0
208
- }
227
+ 'prettier/prettier': 'off',
228
+ },
209
229
  },
210
230
  ],
211
231
  };
@@ -213,7 +233,7 @@ module.exports = {
213
233
 
214
234
  You can take [`examples/prettier`](examples/prettier/.eslintrc.js) as example.
215
235
 
216
- It could be better to remove the unnecessary parser setting if https://github.com/prettier/eslint-plugin-prettier/pull/413 and https://github.com/prettier/eslint-plugin-prettier/pull/415 been merged and released.
236
+ It could be better to remove the unnecessary `*.js/*.graphql` overrides setting if <https://github.com/prettier/eslint-plugin-prettier/pull/415> will be merged and released.
217
237
 
218
238
  Please help to vote up if you want to speed up the progress.
219
239
 
@@ -0,0 +1,61 @@
1
+ export declare const allConfig: {
2
+ rules: {
3
+ '@graphql-eslint/avoid-duplicate-fields': string;
4
+ '@graphql-eslint/avoid-operation-name-prefix': string;
5
+ '@graphql-eslint/avoid-scalar-result-type-on-mutation': string;
6
+ '@graphql-eslint/description-style': string;
7
+ '@graphql-eslint/input-name': string;
8
+ '@graphql-eslint/match-document-filename': string;
9
+ '@graphql-eslint/no-deprecated': string;
10
+ '@graphql-eslint/no-hashtag-description': string;
11
+ '@graphql-eslint/no-unreachable-types': string;
12
+ '@graphql-eslint/no-unused-fields': string;
13
+ '@graphql-eslint/require-deprecation-date': string;
14
+ '@graphql-eslint/require-description': string;
15
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': string;
16
+ '@graphql-eslint/require-id-when-available': string;
17
+ '@graphql-eslint/selection-set-depth': string;
18
+ '@graphql-eslint/unique-fragment-name': string;
19
+ '@graphql-eslint/unique-operation-name': string;
20
+ '@graphql-eslint/avoid-typename-prefix': string;
21
+ '@graphql-eslint/executable-definitions': string;
22
+ '@graphql-eslint/fields-on-correct-type': string;
23
+ '@graphql-eslint/fragments-on-composite-type': string;
24
+ '@graphql-eslint/known-argument-names': string;
25
+ '@graphql-eslint/known-directives': string;
26
+ '@graphql-eslint/known-fragment-names': string;
27
+ '@graphql-eslint/known-type-names': string;
28
+ '@graphql-eslint/lone-anonymous-operation': string;
29
+ '@graphql-eslint/lone-schema-definition': string;
30
+ '@graphql-eslint/naming-convention': string;
31
+ '@graphql-eslint/no-anonymous-operations': string;
32
+ '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
33
+ '@graphql-eslint/no-fragment-cycles': string;
34
+ '@graphql-eslint/no-operation-name-suffix': string;
35
+ '@graphql-eslint/no-undefined-variables': string;
36
+ '@graphql-eslint/no-unused-fragments': string;
37
+ '@graphql-eslint/no-unused-variables': string;
38
+ '@graphql-eslint/one-field-subscriptions': string;
39
+ '@graphql-eslint/overlapping-fields-can-be-merged': string;
40
+ '@graphql-eslint/possible-fragment-spread': string;
41
+ '@graphql-eslint/possible-type-extension': string;
42
+ '@graphql-eslint/provided-required-arguments': string;
43
+ '@graphql-eslint/require-deprecation-reason': string;
44
+ '@graphql-eslint/scalar-leafs': string;
45
+ '@graphql-eslint/strict-id-in-types': string;
46
+ '@graphql-eslint/unique-argument-names': string;
47
+ '@graphql-eslint/unique-directive-names': string;
48
+ '@graphql-eslint/unique-directive-names-per-location': string;
49
+ '@graphql-eslint/unique-enum-value-names': string;
50
+ '@graphql-eslint/unique-field-definition-names': string;
51
+ '@graphql-eslint/unique-input-field-names': string;
52
+ '@graphql-eslint/unique-operation-types': string;
53
+ '@graphql-eslint/unique-type-names': string;
54
+ '@graphql-eslint/unique-variable-names': string;
55
+ '@graphql-eslint/value-literals-of-correct-type': string;
56
+ '@graphql-eslint/variables-are-input-types': string;
57
+ '@graphql-eslint/variables-in-allowed-position': string;
58
+ };
59
+ parser: string;
60
+ plugins: string[];
61
+ };
@@ -0,0 +1,107 @@
1
+ export declare const configs: {
2
+ all: {
3
+ rules: {
4
+ '@graphql-eslint/avoid-duplicate-fields': string;
5
+ '@graphql-eslint/avoid-operation-name-prefix': string;
6
+ '@graphql-eslint/avoid-scalar-result-type-on-mutation': string;
7
+ '@graphql-eslint/description-style': string;
8
+ '@graphql-eslint/input-name': string;
9
+ '@graphql-eslint/match-document-filename': string;
10
+ '@graphql-eslint/no-deprecated': string;
11
+ '@graphql-eslint/no-hashtag-description': string;
12
+ '@graphql-eslint/no-unreachable-types': string;
13
+ '@graphql-eslint/no-unused-fields': string;
14
+ '@graphql-eslint/require-deprecation-date': string;
15
+ '@graphql-eslint/require-description': string;
16
+ '@graphql-eslint/require-field-of-type-query-in-mutation-result': string;
17
+ '@graphql-eslint/require-id-when-available': string;
18
+ '@graphql-eslint/selection-set-depth': string;
19
+ '@graphql-eslint/unique-fragment-name': string;
20
+ '@graphql-eslint/unique-operation-name': string;
21
+ '@graphql-eslint/avoid-typename-prefix': string;
22
+ '@graphql-eslint/executable-definitions': string;
23
+ '@graphql-eslint/fields-on-correct-type': string;
24
+ '@graphql-eslint/fragments-on-composite-type': string;
25
+ '@graphql-eslint/known-argument-names': string;
26
+ '@graphql-eslint/known-directives': string;
27
+ '@graphql-eslint/known-fragment-names': string;
28
+ '@graphql-eslint/known-type-names': string;
29
+ '@graphql-eslint/lone-anonymous-operation': string;
30
+ '@graphql-eslint/lone-schema-definition': string;
31
+ '@graphql-eslint/naming-convention': string;
32
+ '@graphql-eslint/no-anonymous-operations': string;
33
+ '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
34
+ '@graphql-eslint/no-fragment-cycles': string;
35
+ '@graphql-eslint/no-operation-name-suffix': string;
36
+ '@graphql-eslint/no-undefined-variables': string;
37
+ '@graphql-eslint/no-unused-fragments': string;
38
+ '@graphql-eslint/no-unused-variables': string;
39
+ '@graphql-eslint/one-field-subscriptions': string;
40
+ '@graphql-eslint/overlapping-fields-can-be-merged': string;
41
+ '@graphql-eslint/possible-fragment-spread': string;
42
+ '@graphql-eslint/possible-type-extension': string;
43
+ '@graphql-eslint/provided-required-arguments': string;
44
+ '@graphql-eslint/require-deprecation-reason': string;
45
+ '@graphql-eslint/scalar-leafs': string;
46
+ '@graphql-eslint/strict-id-in-types': string;
47
+ '@graphql-eslint/unique-argument-names': string;
48
+ '@graphql-eslint/unique-directive-names': string;
49
+ '@graphql-eslint/unique-directive-names-per-location': string;
50
+ '@graphql-eslint/unique-enum-value-names': string;
51
+ '@graphql-eslint/unique-field-definition-names': string;
52
+ '@graphql-eslint/unique-input-field-names': string;
53
+ '@graphql-eslint/unique-operation-types': string;
54
+ '@graphql-eslint/unique-type-names': string;
55
+ '@graphql-eslint/unique-variable-names': string;
56
+ '@graphql-eslint/value-literals-of-correct-type': string;
57
+ '@graphql-eslint/variables-are-input-types': string;
58
+ '@graphql-eslint/variables-in-allowed-position': string;
59
+ };
60
+ parser: string;
61
+ plugins: string[];
62
+ };
63
+ recommended: {
64
+ parser: string;
65
+ plugins: string[];
66
+ rules: {
67
+ '@graphql-eslint/avoid-typename-prefix': string;
68
+ '@graphql-eslint/executable-definitions': string;
69
+ '@graphql-eslint/fields-on-correct-type': string;
70
+ '@graphql-eslint/fragments-on-composite-type': string;
71
+ '@graphql-eslint/known-argument-names': string;
72
+ '@graphql-eslint/known-directives': string;
73
+ '@graphql-eslint/known-fragment-names': string;
74
+ '@graphql-eslint/known-type-names': string;
75
+ '@graphql-eslint/lone-anonymous-operation': string;
76
+ '@graphql-eslint/lone-schema-definition': string;
77
+ '@graphql-eslint/naming-convention': string;
78
+ '@graphql-eslint/no-anonymous-operations': string;
79
+ '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
80
+ '@graphql-eslint/no-fragment-cycles': string;
81
+ '@graphql-eslint/no-operation-name-suffix': string;
82
+ '@graphql-eslint/no-undefined-variables': string;
83
+ '@graphql-eslint/no-unused-fragments': string;
84
+ '@graphql-eslint/no-unused-variables': string;
85
+ '@graphql-eslint/one-field-subscriptions': string;
86
+ '@graphql-eslint/overlapping-fields-can-be-merged': string;
87
+ '@graphql-eslint/possible-fragment-spread': string;
88
+ '@graphql-eslint/possible-type-extension': string;
89
+ '@graphql-eslint/provided-required-arguments': string;
90
+ '@graphql-eslint/require-deprecation-reason': string;
91
+ '@graphql-eslint/scalar-leafs': string;
92
+ '@graphql-eslint/strict-id-in-types': string;
93
+ '@graphql-eslint/unique-argument-names': string;
94
+ '@graphql-eslint/unique-directive-names': string;
95
+ '@graphql-eslint/unique-directive-names-per-location': string;
96
+ '@graphql-eslint/unique-enum-value-names': string;
97
+ '@graphql-eslint/unique-field-definition-names': string;
98
+ '@graphql-eslint/unique-input-field-names': string;
99
+ '@graphql-eslint/unique-operation-types': string;
100
+ '@graphql-eslint/unique-type-names': string;
101
+ '@graphql-eslint/unique-variable-names': string;
102
+ '@graphql-eslint/value-literals-of-correct-type': string;
103
+ '@graphql-eslint/variables-are-input-types': string;
104
+ '@graphql-eslint/variables-in-allowed-position': string;
105
+ };
106
+ };
107
+ };
@@ -0,0 +1,44 @@
1
+ export declare const recommendedConfig: {
2
+ parser: string;
3
+ plugins: string[];
4
+ rules: {
5
+ '@graphql-eslint/avoid-typename-prefix': string;
6
+ '@graphql-eslint/executable-definitions': string;
7
+ '@graphql-eslint/fields-on-correct-type': string;
8
+ '@graphql-eslint/fragments-on-composite-type': string;
9
+ '@graphql-eslint/known-argument-names': string;
10
+ '@graphql-eslint/known-directives': string;
11
+ '@graphql-eslint/known-fragment-names': string;
12
+ '@graphql-eslint/known-type-names': string;
13
+ '@graphql-eslint/lone-anonymous-operation': string;
14
+ '@graphql-eslint/lone-schema-definition': string;
15
+ '@graphql-eslint/naming-convention': string;
16
+ '@graphql-eslint/no-anonymous-operations': string;
17
+ '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
18
+ '@graphql-eslint/no-fragment-cycles': string;
19
+ '@graphql-eslint/no-operation-name-suffix': string;
20
+ '@graphql-eslint/no-undefined-variables': string;
21
+ '@graphql-eslint/no-unused-fragments': string;
22
+ '@graphql-eslint/no-unused-variables': string;
23
+ '@graphql-eslint/one-field-subscriptions': string;
24
+ '@graphql-eslint/overlapping-fields-can-be-merged': string;
25
+ '@graphql-eslint/possible-fragment-spread': string;
26
+ '@graphql-eslint/possible-type-extension': string;
27
+ '@graphql-eslint/provided-required-arguments': string;
28
+ '@graphql-eslint/require-deprecation-reason': string;
29
+ '@graphql-eslint/scalar-leafs': string;
30
+ '@graphql-eslint/strict-id-in-types': string;
31
+ '@graphql-eslint/unique-argument-names': string;
32
+ '@graphql-eslint/unique-directive-names': string;
33
+ '@graphql-eslint/unique-directive-names-per-location': string;
34
+ '@graphql-eslint/unique-enum-value-names': string;
35
+ '@graphql-eslint/unique-field-definition-names': string;
36
+ '@graphql-eslint/unique-input-field-names': string;
37
+ '@graphql-eslint/unique-operation-types': string;
38
+ '@graphql-eslint/unique-type-names': string;
39
+ '@graphql-eslint/unique-variable-names': string;
40
+ '@graphql-eslint/value-literals-of-correct-type': string;
41
+ '@graphql-eslint/variables-are-input-types': string;
42
+ '@graphql-eslint/variables-in-allowed-position': string;
43
+ };
44
+ };
package/docs/README.md CHANGED
@@ -2,67 +2,71 @@
2
2
 
3
3
  Each rule has emojis denoting:
4
4
 
5
- * 🚀 `graphql-eslint` rule
6
- * 🔮 `graphql-js` rule
7
- * 🔧 if some problems reported by the rule are automatically fixable by the `--fix` [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) option
5
+ - 🚀 `graphql-eslint` rule
6
+ - 🔮 `graphql-js` rule
7
+ - 🔧 if some problems reported by the rule are automatically fixable by the `--fix` [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) option
8
+ - ✅ if it belongs to the `recommended` configuration
8
9
 
9
- <!-- Do not manually modify this table. Run: `yarn generate:docs` -->
10
- <!-- RULES_TABLE_START -->
11
- | Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description | 🚀&nbsp;/&nbsp;🔮 | 🔧 |
12
- | :-- | :-- | :-- | :-- |
13
- | [avoid-duplicate-fields](rules/avoid-duplicate-fields.md) | Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
14
- | [avoid-operation-name-prefix](rules/avoid-operation-name-prefix.md) | Enforce/avoid operation name prefix, useful if you wish to avoid prefix in your root fields, or avoid using REST terminology in your schema. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
15
- | [avoid-typename-prefix](rules/avoid-typename-prefix.md) | Enforces users to avoid using the type name in a field name while defining your schema. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
16
- | [description-style](rules/description-style.md) | Require all comments to follow the same style (either block or inline). | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
17
- | [executable-definitions](rules/executable-definitions.md) | A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
18
- | [fields-on-correct-type](rules/fields-on-correct-type.md) | 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`. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
19
- | [fragments-on-composite-type](rules/fragments-on-composite-type.md) | 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. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
20
- | [input-name](rules/input-name.md) | Require mutation argument to be always called "input" and input type to be called Mutation name + "Input". | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
21
- | [known-argument-names](rules/known-argument-names.md) | A GraphQL field is only valid if all supplied arguments are defined by that field. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
22
- | [known-directives](rules/known-directives.md) | A GraphQL document is only valid if all `@directives` are known by the schema and legally positioned. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
23
- | [known-fragment-names](rules/known-fragment-names.md) | A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
24
- | [known-type-names](rules/known-type-names.md) | A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
25
- | [lone-anonymous-operation](rules/lone-anonymous-operation.md) | A GraphQL document is only valid if when it contains an anonymous operation (the query short-hand) that it contains only that one operation definition. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
26
- | [lone-schema-definition](rules/lone-schema-definition.md) | A GraphQL document is only valid if it contains only one schema definition. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
27
- | [match-document-filename](rules/match-document-filename.md) | This rule allows you to enforce that the file name should match the operation name | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
28
- | [naming-convention](rules/naming-convention.md) | Require names to follow specified conventions. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
29
- | [no-anonymous-operations](rules/no-anonymous-operations.md) | Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
30
- | [no-case-insensitive-enum-values-duplicates](rules/no-case-insensitive-enum-values-duplicates.md) | | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | 🔧 |
31
- | [no-deprecated](rules/no-deprecated.md) | Enforce that deprecated fields or enum values are not in use by operations. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
32
- | [no-fragment-cycles](rules/no-fragment-cycles.md) | A GraphQL fragment is only valid when it does not have cycles in fragments usage. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
33
- | [no-hashtag-description](rules/no-hashtag-description.md) | Requires to use `"""` or `"` for adding a GraphQL description instead of `#`. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
34
- | [no-operation-name-suffix](rules/no-operation-name-suffix.md) | Makes sure you are not adding the operation type to the name of the operation. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | 🔧 |
35
- | [no-undefined-variables](rules/no-undefined-variables.md) | A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
36
- | [no-unreachable-types](rules/no-unreachable-types.md) | Requires all types to be reachable at some level by root level fields. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | 🔧 |
37
- | [no-unused-fields](rules/no-unused-fields.md) | Requires all fields to be used at some level by siblings operations. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | 🔧 |
38
- | [no-unused-fragments](rules/no-unused-fragments.md) | A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
39
- | [no-unused-variables](rules/no-unused-variables.md) | A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
40
- | [one-field-subscriptions](rules/one-field-subscriptions.md) | A GraphQL subscription is valid only if it contains a single root field. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
41
- | [overlapping-fields-can-be-merged](rules/overlapping-fields-can-be-merged.md) | 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. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
42
- | [possible-fragment-spread](rules/possible-fragment-spread.md) | 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. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
43
- | [possible-type-extension](rules/possible-type-extension.md) | A type extension is only valid if the type is defined and has the same kind. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
44
- | [provided-required-arguments](rules/provided-required-arguments.md) | A field or directive is only valid if all required (non-null without a default value) field arguments have been provided. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
45
- | [require-deprecation-reason](rules/require-deprecation-reason.md) | Require all deprecation directives to specify a reason. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
46
- | [require-description](rules/require-description.md) | Enforce descriptions in your type definitions. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
47
- | [require-id-when-available](rules/require-id-when-available.md) | Enforce selecting specific fields when they are available on the GraphQL type. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
48
- | [scalar-leafs](rules/scalar-leafs.md) | A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
49
- | [selection-set-depth](rules/selection-set-depth.md) | Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://github.com/stems/graphql-depth-limit). | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
50
- | [strict-id-in-types](rules/strict-id-in-types.md) | 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. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
51
- | [unique-argument-names](rules/unique-argument-names.md) | A GraphQL field or directive is only valid if all supplied arguments are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
52
- | [unique-directive-names](rules/unique-directive-names.md) | A GraphQL document is only valid if all defined directives have unique names. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
53
- | [unique-directive-names-per-location](rules/unique-directive-names-per-location.md) | A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
54
- | [unique-enum-value-names](rules/unique-enum-value-names.md) | A GraphQL enum type is only valid if all its values are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
55
- | [unique-field-definition-names](rules/unique-field-definition-names.md) | A GraphQL complex type is only valid if all its fields are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
56
- | [unique-fragment-name](rules/unique-fragment-name.md) | Enforce unique fragment names across your project. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
57
- | [unique-input-field-names](rules/unique-input-field-names.md) | A GraphQL input object value is only valid if all supplied fields are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
58
- | [unique-operation-name](rules/unique-operation-name.md) | Enforce unique operation names across your project. | &nbsp;&nbsp;&nbsp;&nbsp;🚀 | |
59
- | [unique-operation-types](rules/unique-operation-types.md) | A GraphQL document is only valid if it has only one type per operation. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
60
- | [unique-type-names](rules/unique-type-names.md) | A GraphQL document is only valid if all defined types have unique names. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
61
- | [unique-variable-names](rules/unique-variable-names.md) | A GraphQL operation is only valid if all its variables are uniquely named. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
62
- | [value-literals-of-correct-type](rules/value-literals-of-correct-type.md) | A GraphQL document is only valid if all value literals are of the type expected at their position. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
63
- | [variables-are-input-types](rules/variables-are-input-types.md) | A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object). | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
64
- | [variables-in-allowed-position](rules/variables-in-allowed-position.md) | Variables passed to field arguments conform to type. | &nbsp;&nbsp;&nbsp;&nbsp;🔮 | |
65
- <!-- RULES_TABLE_END -->
10
+ <!-- 🚨 IMPORTANT! Do not manually modify this table. Run: `yarn generate:docs` -->
11
+ <!-- prettier-ignore-start -->
12
+ Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Description|🚀&nbsp;/&nbsp;🔮|🔧|✅
13
+ -|-|:-:|-|-
14
+ [avoid-duplicate-fields](rules/avoid-duplicate-fields.md)|Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.|🚀||
15
+ [avoid-operation-name-prefix](rules/avoid-operation-name-prefix.md)|Enforce/avoid operation name prefix, useful if you wish to avoid prefix in your root fields, or avoid using REST terminology in your schema.|🚀||
16
+ [avoid-scalar-result-type-on-mutation](rules/avoid-scalar-result-type-on-mutation.md)|Avoid scalar result type on mutation type to make sure to return a valid state.|🚀||
17
+ [avoid-typename-prefix](rules/avoid-typename-prefix.md)|Enforces users to avoid using the type name in a field name while defining your schema.|🚀||✅
18
+ [description-style](rules/description-style.md)|Require all comments to follow the same style (either block or inline).|🚀||
19
+ [executable-definitions](rules/executable-definitions.md)|A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.|🔮||✅
20
+ [fields-on-correct-type](rules/fields-on-correct-type.md)|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`.|🔮||✅
21
+ [fragments-on-composite-type](rules/fragments-on-composite-type.md)|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.|🔮||✅
22
+ [input-name](rules/input-name.md)|Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".|🚀||
23
+ [known-argument-names](rules/known-argument-names.md)|A GraphQL field is only valid if all supplied arguments are defined by that field.|🔮||✅
24
+ [known-directives](rules/known-directives.md)|A GraphQL document is only valid if all `@directives` are known by the schema and legally positioned.|🔮||✅
25
+ [known-fragment-names](rules/known-fragment-names.md)|A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.|🔮||✅
26
+ [known-type-names](rules/known-type-names.md)|A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.|🔮||✅
27
+ [lone-anonymous-operation](rules/lone-anonymous-operation.md)|A GraphQL document is only valid if when it contains an anonymous operation (the query short-hand) that it contains only that one operation definition.|🔮||✅
28
+ [lone-schema-definition](rules/lone-schema-definition.md)|A GraphQL document is only valid if it contains only one schema definition.|🔮||✅
29
+ [match-document-filename](rules/match-document-filename.md)|This rule allows you to enforce that the file name should match the operation name.|🚀||
30
+ [naming-convention](rules/naming-convention.md)|Require names to follow specified conventions.|🚀||✅
31
+ [no-anonymous-operations](rules/no-anonymous-operations.md)|Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.|🚀||✅
32
+ [no-case-insensitive-enum-values-duplicates](rules/no-case-insensitive-enum-values-duplicates.md)|Disallow case-insensitive enum values duplicates.|🚀|🔧|✅
33
+ [no-deprecated](rules/no-deprecated.md)|Enforce that deprecated fields or enum values are not in use by operations.|🚀||
34
+ [no-fragment-cycles](rules/no-fragment-cycles.md)|A GraphQL fragment is only valid when it does not have cycles in fragments usage.|🔮||✅
35
+ [no-hashtag-description](rules/no-hashtag-description.md)|Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.|🚀||
36
+ [no-operation-name-suffix](rules/no-operation-name-suffix.md)|Makes sure you are not adding the operation type to the name of the operation.|🚀|🔧|✅
37
+ [no-undefined-variables](rules/no-undefined-variables.md)|A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.|🔮||✅
38
+ [no-unreachable-types](rules/no-unreachable-types.md)|Requires all types to be reachable at some level by root level fields.|🚀|🔧|
39
+ [no-unused-fields](rules/no-unused-fields.md)|Requires all fields to be used at some level by siblings operations.|🚀|🔧|
40
+ [no-unused-fragments](rules/no-unused-fragments.md)|A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.|🔮||✅
41
+ [no-unused-variables](rules/no-unused-variables.md)|A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.|🔮||✅
42
+ [one-field-subscriptions](rules/one-field-subscriptions.md)|A GraphQL subscription is valid only if it contains a single root field.|🔮||✅
43
+ [overlapping-fields-can-be-merged](rules/overlapping-fields-can-be-merged.md)|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.|🔮||✅
44
+ [possible-fragment-spread](rules/possible-fragment-spread.md)|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.|🔮||✅
45
+ [possible-type-extension](rules/possible-type-extension.md)|A type extension is only valid if the type is defined and has the same kind.|🔮||✅
46
+ [provided-required-arguments](rules/provided-required-arguments.md)|A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.|🔮||✅
47
+ [require-deprecation-date](rules/require-deprecation-date.md)|Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.|🚀||
48
+ [require-deprecation-reason](rules/require-deprecation-reason.md)|Require all deprecation directives to specify a reason.|🚀||✅
49
+ [require-description](rules/require-description.md)|Enforce descriptions in your type definitions.|🚀||
50
+ [require-field-of-type-query-in-mutation-result](rules/require-field-of-type-query-in-mutation-result.md)|Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.|🚀||
51
+ [require-id-when-available](rules/require-id-when-available.md)|Enforce selecting specific fields when they are available on the GraphQL type.|🚀||
52
+ [scalar-leafs](rules/scalar-leafs.md)|A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.|🔮||✅
53
+ [selection-set-depth](rules/selection-set-depth.md)|Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://github.com/stems/graphql-depth-limit).|🚀||
54
+ [strict-id-in-types](rules/strict-id-in-types.md)|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.|🚀||✅
55
+ [unique-argument-names](rules/unique-argument-names.md)|A GraphQL field or directive is only valid if all supplied arguments are uniquely named.|🔮||✅
56
+ [unique-directive-names](rules/unique-directive-names.md)|A GraphQL document is only valid if all defined directives have unique names.|🔮||✅
57
+ [unique-directive-names-per-location](rules/unique-directive-names-per-location.md)|A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.|🔮||✅
58
+ [unique-enum-value-names](rules/unique-enum-value-names.md)|A GraphQL enum type is only valid if all its values are uniquely named.|🔮||✅
59
+ [unique-field-definition-names](rules/unique-field-definition-names.md)|A GraphQL complex type is only valid if all its fields are uniquely named.|🔮||✅
60
+ [unique-fragment-name](rules/unique-fragment-name.md)|Enforce unique fragment names across your project.|🚀||
61
+ [unique-input-field-names](rules/unique-input-field-names.md)|A GraphQL input object value is only valid if all supplied fields are uniquely named.|🔮||✅
62
+ [unique-operation-name](rules/unique-operation-name.md)|Enforce unique operation names across your project.|🚀||
63
+ [unique-operation-types](rules/unique-operation-types.md)|A GraphQL document is only valid if it has only one type per operation.|🔮||✅
64
+ [unique-type-names](rules/unique-type-names.md)|A GraphQL document is only valid if all defined types have unique names.|🔮||✅
65
+ [unique-variable-names](rules/unique-variable-names.md)|A GraphQL operation is only valid if all its variables are uniquely named.|🔮||✅
66
+ [value-literals-of-correct-type](rules/value-literals-of-correct-type.md)|A GraphQL document is only valid if all value literals are of the type expected at their position.|🔮||✅
67
+ [variables-are-input-types](rules/variables-are-input-types.md)|A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).|🔮||✅
68
+ [variables-in-allowed-position](rules/variables-in-allowed-position.md)|Variables passed to field arguments conform to type.|🔮||✅
69
+ <!-- prettier-ignore-end -->
66
70
 
67
71
  ## Further Reading
68
72
 
@@ -0,0 +1,30 @@
1
+ # `avoid-scalar-result-type-on-mutation`
2
+
3
+ - Category: `Best Practices`
4
+ - Rule name: `@graphql-eslint/avoid-scalar-result-type-on-mutation`
5
+ - Requires GraphQL Schema: `true` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
6
+ - Requires GraphQL Operations: `false` [â„šī¸](../../README.md#extended-linting-rules-with-siblings-operations)
7
+
8
+ Avoid scalar result type on mutation type to make sure to return a valid state.
9
+
10
+ ## Usage Examples
11
+
12
+ ### Incorrect
13
+
14
+ ```graphql
15
+ # eslint @graphql-eslint/avoid-scalar-result-type-on-mutation: 'error'
16
+
17
+ type Mutation {
18
+ createUser: Boolean
19
+ }
20
+ ```
21
+
22
+ ### Correct
23
+
24
+ ```graphql
25
+ # eslint @graphql-eslint/avoid-scalar-result-type-on-mutation: 'error'
26
+
27
+ type Mutation {
28
+ createUser: User!
29
+ }
30
+ ```
@@ -1,5 +1,7 @@
1
1
  # `avoid-typename-prefix`
2
2
 
3
+ ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
+
3
5
  - Category: `Best Practices`
4
6
  - Rule name: `@graphql-eslint/avoid-typename-prefix`
5
7
  - Requires GraphQL Schema: `false` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
@@ -1,5 +1,7 @@
1
1
  # `executable-definitions`
2
2
 
3
+ ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
+
3
5
  - Category: `Validation`
4
6
  - Rule name: `@graphql-eslint/executable-definitions`
5
7
  - Requires GraphQL Schema: `true` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
@@ -7,4 +9,4 @@
7
9
 
8
10
  A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
9
11
 
10
- > This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ExecutableDefinitionsRule.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/ExecutableDefinitionsRule.ts).
@@ -1,5 +1,7 @@
1
1
  # `fields-on-correct-type`
2
2
 
3
+ ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
+
3
5
  - Category: `Validation`
4
6
  - Rule name: `@graphql-eslint/fields-on-correct-type`
5
7
  - Requires GraphQL Schema: `true` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
@@ -7,4 +9,4 @@
7
9
 
8
10
  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`.
9
11
 
10
- > This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FieldsOnCorrectTypeRule.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/FieldsOnCorrectTypeRule.ts).
@@ -1,5 +1,7 @@
1
1
  # `fragments-on-composite-type`
2
2
 
3
+ ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
+
3
5
  - Category: `Validation`
4
6
  - Rule name: `@graphql-eslint/fragments-on-composite-type`
5
7
  - Requires GraphQL Schema: `true` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
@@ -7,4 +9,4 @@
7
9
 
8
10
  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.
9
11
 
10
- > This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FragmentsOnCompositeTypesRule.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/FragmentsOnCompositeTypesRule.ts).
@@ -1,5 +1,7 @@
1
1
  # `known-argument-names`
2
2
 
3
+ ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
+
3
5
  - Category: `Validation`
4
6
  - Rule name: `@graphql-eslint/known-argument-names`
5
7
  - Requires GraphQL Schema: `true` [â„šī¸](../../README.md#extended-linting-rules-with-graphql-schema)
@@ -7,4 +9,4 @@
7
9
 
8
10
  A GraphQL field is only valid if all supplied arguments are defined by that field.
9
11
 
10
- > This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownArgumentNamesRule.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/KnownArgumentNamesRule.ts).