-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
99 lines (99 loc) · 2.46 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
88
89
90
91
92
93
94
95
96
97
98
99
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'airbnb',
'prettier',
'eslint:recommended',
'plugin:unicorn/all',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: ['react', 'unicorn', 'prettier', 'react-hooks'],
rules: {
indent: 0,
curly: 'error',
'no-debugger': 2,
'no-else-return': 1,
semi: [1, 'always'],
'no-console': 'warn',
'space-unary-ops': 2,
'no-plusplus': 'off',
'react/prop-types': 0,
'no-unused-vars': 'off',
'unicorn/no-null': 'off',
'react/jsx-no-bind': 'off',
'no-param-reassign': 'off',
'react/display-name': 'off',
'consistent-return': 'warn',
'react/jsx-uses-react': 'off',
'react/no-multi-comp': 'error',
'no-extra-boolean-cast': 'off',
'no-restricted-exports': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/filename-case': 'off',
'prettier/prettier': ['error'],
'import/no-unresolved': 'error',
'unicorn/no-array-reduce': 'off',
'no-underscore-dangle': ['error'],
'unicorn/prefer-node-protocol': 0,
'react/react-in-jsx-scope': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/no-keyword-prefix': 'off',
'react-hooks/exhaustive-deps': 'warn',
'import/prefer-default-export': 'off',
'react-hooks/rules-of-hooks': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'prefer-arrow-callback': [
'error',
{
allowNamedFunctions: true
}
],
'no-empty': [
'error',
{
allowEmptyCatch: true
}
],
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement'
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never'
}
]
},
settings: {
react: {
version: 'detect'
},
'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'] },
'import/resolver': { typescript: {} }
}
};