-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
117 lines (117 loc) · 3.15 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
module.exports = {
parser: '@typescript-eslint/parser',
env: {
browser: true,
es6: true,
node: true,
jest: true
},
globals: {
document: true,
navigator: true,
window: true
},
extends: [
'airbnb',
'eslint:recommended',
'plugin:react/recommended',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
parserOptions: {
// Allows for the parsing of modern ECMAScript features
ecmaVersion: 2020,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
modules: true
},
sourceType: 'module'
},
plugins: [
'react',
'import',
'prettier',
'react-hooks',
'@typescript-eslint'
],
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use
version: 'detect',
createClass: 'createClass'
}
},
rules: {
strict: 0,
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
'import/no-named-as-default': 0,
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-param-reassign': ['off', { props: false }],
'prettier/prettier': 'warn',
'no-tabs': ['error', { allowIndentationTabs: true }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/no-did-update-set-state': 0,
'no-unused-expressions': 0,
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
varsIgnorePattern: 'error',
argsIgnorePattern: '^own[p|P]rops$|^prev[s|S]tate$|^e$|^_$'
}
],
'class-methods-use-this': 0,
'import/extensions': [
'error',
'never',
{
packages: 'always'
}
],
'linebreak-style': 0,
'no-console': 0,
'no-restricted-globals': 'warn',
'prefer-destructuring': ['warn', { object: true, array: false }],
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true
}
],
'jsx-a11y/label-has-associated-control': 0,
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', '.tsx', '.ts']
}
],
'react/prefer-stateless-function': [
1,
{
ignorePureComponents: true
}
],
'react/display-name': [
0,
{
ignoreTranspilerName: true
}
],
'react/jsx-props-no-spreading': [
0,
{
html: 0,
custom: 0
}
]
}
}