-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
87 lines (86 loc) · 2.42 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
84
85
86
87
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:prettier/recommended',
'plugin:react/recommended',
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react-hooks', '@typescript-eslint', 'prettier', 'react'],
settings: {
'import/resolver': {
typescript: {}
}
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/extensions': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-wrap-multilines': [1, { assignment: 'parens-new-line' }],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function'
}
],
'no-param-reassign': [2, { props: false }],
'arrow-parens': ['error', 'always'],
'object-curly-newline': [
'error',
{
consistent: true,
multiline: true
}
],
'react/require-default-props': 'off',
'no-case-declarations': 'off',
'import/prefer-default-export': 'off',
'no-control-regex': 'off',
'react/prop-types': ['off'],
'no-underscore-dangle': ['warn'],
'implicit-arrow-linebreak': 'off',
semi: 'off',
'quote-props': [2, 'as-needed'],
'comma-dangle': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'linebreak-style': 'off',
'function-paren-newline': 'off',
indent: 'off',
'no-undef': 'off',
'import/no-extraneous-dependencies': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-console': 'off',
'operator-linebreak': 'off',
'import/no-unresolved': 'error',
'import/order': [
1,
{
groups: [['external', 'builtin'], 'type', 'internal', 'sibling', 'parent', 'index'],
pathGroups: [
{
pattern: 'components|hooks|helpers|utils|store|types|constants|contexts|api',
group: 'internal'
}
],
pathGroupsExcludedImportTypes: ['internal'],
alphabetize: {
order: 'asc',
caseInsensitive: true
},
'newlines-between': 'always'
}
]
}
}