generated from benmardana/reactapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
63 lines (63 loc) · 1.58 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['airbnb', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', 'prettier', 'react-hooks', '@typescript-eslint'],
rules: {
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/extensions': [
'error',
{
js: 'never',
actions: 'always',
graphql: 'always',
png: 'always',
css: 'always',
scss: 'always',
svg: 'always',
},
],
'import/no-named-as-default': 'off',
'@typescript-eslint/no-unused-vars': [
2,
{
args: 'none',
ignoreRestSiblings: true,
},
],
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.tsx'] },
],
'react/no-array-index-key': 0,
'no-unused-expressions': ['off'],
'no-unused-vars': ['off'],
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true },
],
'react/require-default-props': 'off',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-undef': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': ['error'],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
};