@@ -46,17 +46,6 @@ module.exports = {
46
46
// compat
47
47
'compat/compat' : 'warn' ,
48
48
49
- // graphql
50
- 'graphql/template-strings' : [
51
- 'error' ,
52
- {
53
- env : 'relay' ,
54
- // eslint-disable-next-line global-require
55
- schemaJson : require ( './build/schema.json' ) . data ,
56
- tagName : 'graphql' ,
57
- } ,
58
- ] ,
59
-
60
49
// prettier
61
50
'prettier/prettier' : [
62
51
'error' ,
@@ -71,8 +60,51 @@ module.exports = {
71
60
env : {
72
61
browser : true ,
73
62
} ,
74
- plugins : [ 'react' , 'graphql' , ' compat', 'prettier' , 'jsx-a11y' ] ,
63
+ plugins : [ 'react' , 'compat' , 'prettier' , 'jsx-a11y' ] ,
75
64
settings : {
76
65
polyfills : [ 'fetch' , 'promises' ] ,
77
66
} ,
67
+ overrides : [
68
+ {
69
+ files : [ '*.js' ] ,
70
+ processor : '@graphql-eslint/graphql' ,
71
+ } ,
72
+ {
73
+ files : [ '*.graphql' ] ,
74
+ extends : [
75
+ 'plugin:@graphql-eslint/operations-recommended' ,
76
+ 'plugin:@graphql-eslint/relay' ,
77
+ ] ,
78
+ // Available rules can be found at https://the-guild.dev/graphql/eslint/rules/naming-convention
79
+ rules : {
80
+ '@graphql-eslint/no-deprecated' : 'warn' ,
81
+ // Recommended naming conventions have some clashes with relay conventions
82
+ '@graphql-eslint/naming-convention' : [
83
+ 'error' ,
84
+ {
85
+ VariableDefinition : 'camelCase' ,
86
+ } ,
87
+ ] ,
88
+ // Relay directives caused errors and ignoring them didn't work for some reason
89
+ '@graphql-eslint/known-directives' : 'off' ,
90
+
91
+ // These require parserOptions.operations to be defined
92
+ // but haven't been able to figure out if it is possible
93
+ // to define them with relay
94
+ '@graphql-eslint/known-fragment-names' : 'off' ,
95
+ '@graphql-eslint/no-one-place-fragments' : 'off' ,
96
+ '@graphql-eslint/no-undefined-variables' : 'off' ,
97
+ '@graphql-eslint/no-unused-fragments' : 'off' ,
98
+ '@graphql-eslint/no-unused-variables' : 'off' ,
99
+ '@graphql-eslint/require-id-when-available' : 'off' ,
100
+ '@graphql-eslint/require-import-fragment' : 'off' ,
101
+ '@graphql-eslint/selection-set-depth' : 'off' ,
102
+ '@graphql-eslint/unique-fragment-name' : 'off' ,
103
+ '@graphql-eslint/unique-operation-name' : 'off' ,
104
+ } ,
105
+ parserOptions : {
106
+ schema : './build/schema.graphql' ,
107
+ } ,
108
+ } ,
109
+ ] ,
78
110
} ;
0 commit comments