-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
81 lines (73 loc) · 1.74 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = {
root: true,
extends: ['react-app', 'airbnb'],
plugins: ['react'],
env: {
browser: true,
node: false,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
impliedStrict: true,
},
rules: {
'global-require': 'off',
'react/jsx-curly-newline': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-one-expression-per-line': 'off',
'prefer-arrow-callback': 'off',
'consistent-return': 'warn',
'object-curly-newline': 'warn',
'no-shadow': 'warn',
'no-use-before-define': 'warn',
'no-param-reassign': 'off',
'no-multiple-empty-lines': ['error', { "max": 1 }],
'import/no-extraneous-dependencies': 'warn',
'import/prefer-default-export': 'off',
'react/jsx-filename-extension': 'off',
'react/prop-types': 'error',
'react/jsx-no-bind': 'warn',
'react/no-danger': 'off',
'react/jsx-max-props-per-line': ['error', { when: 'always', maximum: 3 }],
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/no-noninteractive-element-interactions': [
'error',
{
handlers: [
'onClick',
'onError',
'onLoad',
'onMouseDown',
'onMouseUp',
'onKeyPress',
'onKeyUp',
]
},
],
},
overrides: [
// Node files
{
files: ['.eslintrc.js'],
env: {
browser: false,
node: true,
},
parserOptions: {
sourceType: 'script'
},
},
// Tests
{
files: ['src/**/*.test.js'],
env: {
browser: true,
jest: true,
node: false,
},
},
],
};