forked from graphql-hive/graphql-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperations-recommended.ts
50 lines (49 loc) · 2.2 KB
/
operations-recommended.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
*/
export default {
extends: ['plugin:@graphql-eslint/base'],
rules: {
'@graphql-eslint/executable-definitions': 'error',
'@graphql-eslint/fields-on-correct-type': 'error',
'@graphql-eslint/fragments-on-composite-type': 'error',
'@graphql-eslint/known-argument-names': 'error',
'@graphql-eslint/known-directives': 'error',
'@graphql-eslint/known-fragment-names': 'error',
'@graphql-eslint/known-type-names': 'error',
'@graphql-eslint/lone-anonymous-operation': 'error',
'@graphql-eslint/naming-convention': [
'error',
{
VariableDefinition: 'camelCase',
OperationDefinition: {
style: 'PascalCase',
forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
},
FragmentDefinition: { style: 'PascalCase', forbiddenPrefixes: ['Fragment'], forbiddenSuffixes: ['Fragment'] },
},
],
'@graphql-eslint/no-anonymous-operations': 'error',
'@graphql-eslint/no-deprecated': 'error',
'@graphql-eslint/no-duplicate-fields': 'error',
'@graphql-eslint/no-fragment-cycles': 'error',
'@graphql-eslint/no-undefined-variables': 'error',
'@graphql-eslint/no-unused-fragments': 'error',
'@graphql-eslint/no-unused-variables': 'error',
'@graphql-eslint/one-field-subscriptions': 'error',
'@graphql-eslint/overlapping-fields-can-be-merged': 'error',
'@graphql-eslint/possible-fragment-spread': 'error',
'@graphql-eslint/provided-required-arguments': 'error',
'@graphql-eslint/require-id-when-available': 'error',
'@graphql-eslint/scalar-leafs': 'error',
'@graphql-eslint/selection-set-depth': ['error', { maxDepth: 7 }],
'@graphql-eslint/unique-argument-names': 'error',
'@graphql-eslint/unique-directive-names-per-location': 'error',
'@graphql-eslint/unique-input-field-names': 'error',
'@graphql-eslint/unique-variable-names': 'error',
'@graphql-eslint/value-literals-of-correct-type': 'error',
'@graphql-eslint/variables-are-input-types': 'error',
'@graphql-eslint/variables-in-allowed-position': 'error',
},
};