-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
57 lines (56 loc) · 1.4 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
const RULES = {
OFF: 'off',
WARN: 'warn',
ERROR: 'error',
NEVER: 'never',
ALWAYS: 'always'
}
module.exports = {
env: {
browser: true,
es2021: true,
jest: true
},
extends: [
'plugin:jest/recommended',
'plugin:react/recommended',
'standard'
],
settings: {
react: {
version: 'detect'
},
jest: {
version: 'detect'
}
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module'
},
plugins: [
'react',
'jest'
],
rules: {
'prefer-arrow-callback': RULES.WARN,
'prefer-const': RULES.WARN,
quotes: [2, 'single', 'avoid-escape'],
indent: [RULES.ERROR, 4],
'object-curly-spacing': [RULES.ERROR, RULES.ALWAYS],
'space-in-parens': [RULES.ERROR, RULES.ALWAYS],
'react/jsx-indent': [RULES.ERROR, 4],
'react/jsx-indent-props': [RULES.ERROR, 4],
'react/prop-types': RULES.OFF,
'react/react-in-jsx-scope': RULES.OFF,
'react/jsx-curly-spacing': [1, { when: RULES.ALWAYS }],
'jest/no-disabled-tests': RULES.WARN,
'jest/no-focused-tests': RULES.ERROR,
'jest/no-identical-title': RULES.ERROR,
'jest/prefer-to-have-length': RULES.WARN,
'jest/valid-expect': RULES.ERROR
}
}