-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
61 lines (43 loc) · 1.79 KB
/
.eslintrc.js
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
51
52
53
54
55
56
57
58
59
60
61
module.exports = {
env: {
es6: true,
},
plugins: [
"graphql",
],
// Enable one rule at a time below. Then run `npm test` to try it out.
rules: {
// Should report an error, but doesn't.
// "graphql/named-operations": "error",
// Should report an error, but doesn't.
// "graphql/named-operations": ["error"],
// Does report error.
// "graphql/named-operations": ["error", {}],
// Should report config validation error, but nothing happens.
// "graphql/required-fields": "error",
// Should report config validation error, but nothing happens.
// "graphql/required-fields": ["error"],
// Should report config validation error, but crashes:
// TypeError: Cannot read property 'forEach' of undefined
// "graphql/required-fields": ["error", {}],
// Does report error.
// "graphql/required-fields": ["error", {requiredFields: ["id"]}],
// Should report an error, but doesn't.
// "graphql/capitalized-type-name": "error",
// Should report an error, but doesn't.
// "graphql/capitalized-type-name": ["error"],
// Should report an error, but prints validation error:
// Configuration for rule "graphql/capitalized-type-name" is invalid:
// Value "[object Object]" should have required property '.schemaJson'.
// Value "[object Object]" should have required property '.schemaJsonFilepath'.
// Value "[object Object]" should have required property '.schemaString'.
// Value "[object Object]" should match exactly one schema in oneOf.
// "graphql/capitalized-type-name": ["error", {}],
// Does nothing.
// "graphql/template-strings": "error",
// Does nothing.
// "graphql/template-strings": ["error"],
// Does report error.
// "graphql/template-strings": ["error", {}],
}
}