This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
83 lines (83 loc) · 2.02 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
82
83
// TODO: expand configuration and autoformat on save
module.exports = {
parser: 'babel-eslint',
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'src/app/']
}
}
},
extends: [
'airbnb',
'prettier',
'prettier/react',
'plugin:jest/recommended',
'jest-enzyme'
],
parserOptions: {
ecmaVersion: 8,
sourceType: 'module'
},
env: {
es6: true,
node: true,
browser: true
},
plugins: ['prettier', 'react', 'react-hooks'],
rules: {
'react/jsx-filename-extension': [0, { extensions: ['.js', '.jsx'] }],
'react/jsx-no-duplicate-props': [
'error',
{
ignoreCase: false
}
],
'react/jsx-max-depth': [
'error',
{
max: 4
}
],
'react/boolean-prop-naming': [
'error',
{
rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+'
}
],
'react/prop-types': 0,
'react/jsx-no-bind': 0,
'no-underscore-dangle': 0,
'import/imports-first': ['warning', 'absolute-first'],
'import/newline-after-import': 'warning',
'react/prefer-stateless-function': 'off',
'react/destructuring-assignment': 0,
'react/no-unused-state': 0,
'react/no-access-state-in-setstate': 0,
'react/require-default-props': 0,
'import/no-named-as-default': 0,
'import/no-named-as-default-member': 0,
'no-unused-expressions': 0,
'arrow-body-style': 0,
'react/no-did-update-set-state': 0,
'class-methods-use-this': 0,
'prefer-destructuring': 0,
'no-useless-constructor': 1,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'default-case': 0,
'import/prefer-default-export': 0,
'spaced-comment': 0,
curly: [2, 'multi-line'],
'brace-style': 'error',
'import/order': 0,
'import/first': 0,
// todo: enable on production
'no-unused-vars': 0,
'no-use-before-define': 0,
'react/forbid-prop-types': 0,
'react/no-unused-prop-types': 0,
'no-console': 0,
'object-shorthand': 0
}
};