-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.eslintrc.js
59 lines (58 loc) · 1.48 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
const requireText = require('require-text');
const typeDefs = requireText('./mocks/schema.graphql', require);
module.exports = {
env: {
browser: true,
node: true,
'jest/globals': true,
},
plugins: ['jest', 'import', 'filenames', 'graphql'],
extends: ['ezcater-base', 'plugin:jest/recommended'],
rules: {
'graphql/template-strings': [
'error',
{
env: 'apollo',
schemaString: typeDefs,
},
],
'filenames/match-regex': ['error', '^[.a-zA-Z0-9]+$'],
'filenames/match-exported': 'error',
'import/default': 'error',
'import/extensions': ['error', 'never', {svg: 'always'}],
'import/first': 'error',
'import/named': 'error',
'import/namespace': 'error',
'import/no-commonjs': 'error',
'import/no-dynamic-require': 'error',
'import/no-extraneous-dependencies': [
'error',
{
optionalDependencies: false,
},
],
'import/no-named-as-default-member': 'error',
'import/no-named-as-default': 'off',
'import/no-named-default': 'error',
'import/no-namespace': 'error',
'import/no-unresolved': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/order': 'error',
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link', 'NavLink'],
specialLink: ['to'],
},
],
'prettier/prettier': [
'error',
{
printWidth: 80,
},
],
camelcase: 'off',
},
parser: 'babel-eslint',
root: true,
};