-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
78 lines (72 loc) · 1.81 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
module.exports = {
extends: [
'react-app',
'react-app/jest',
'airbnb',
'airbnb/hooks',
'plugin:jest/recommended',
'plugin:unicorn/recommended',
'prettier',
],
settings: {
'import/resolver': {
node: {
paths: ['src'],
},
},
},
rules: {
// core
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-void': 'off',
// prettier
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
// import
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.{test}.js',
'src/setupTests.js',
'src/testUtils.js',
],
},
],
'import/no-named-as-default': 'off',
'import/prefer-default-export': 'off',
// jsx-a11y
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-redundant-roles': 'warn',
// react
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'warn',
'react/require-default-props': 'off',
'react/state-in-constructor': 'off',
// react-hooks
'react-hooks/exhaustive-deps': 'warn',
// unicorn
'unicorn/filename-case': [
'warn',
{
cases: {
camelCase: false,
kebabCase: true,
snakeCase: false,
pascalCase: true,
},
ignore: [/setupTests\.js$/, /testUtils\.js$/],
},
],
'unicorn/consistent-destructuring': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/no-null': 'off',
'unicorn/no-reduce': 'off',
'unicorn/prefer-dom-node-text-content': 'off',
'unicorn/prevent-abbreviations': 'off',
},
};