-
Notifications
You must be signed in to change notification settings - Fork 684
/
.eslintrc.js
55 lines (53 loc) · 1.63 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
const graphQLConfig = require('./graphql.config');
const config = {
parser: 'babel-eslint',
plugins: ['react'],
extends: ['@magento'],
rules: {
'no-prototype-builtins': 'off',
'no-undef': 'off',
'no-useless-escape': 'off',
'react/jsx-no-literals': [
'error',
{
allowedStrings: [],
// Use ignoreProps: false to catch label/title/alt text, etc.
// Has the downside of erroring on "id" and other string props.
ignoreProps: true,
noStrings: true
}
]
},
overrides: [
{
files: ['**/*.gql*.js'],
processor: '@graphql-eslint/graphql'
},
{
files: ['*.graphql'],
parser: '@graphql-eslint/eslint-plugin',
parserOptions: {
operations: graphQLConfig.documents,
schema: graphQLConfig.schema,
schemaOptions: {
assumeValid: true,
method: 'GET'
},
skipGraphQLConfig: true
},
plugins: ['@graphql-eslint'],
rules: {
'@graphql-eslint/known-directives': 'error',
'@graphql-eslint/naming-convention': [
'error',
{
ObjectTypeDefinition: 'PascalCase',
allowLeadingUnderscore: true
}
],
'@graphql-eslint/require-id-when-available': 'error'
}
}
]
};
module.exports = config;