-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
70 lines (70 loc) · 1.81 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
module.exports = {
extends: [
'react-app',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
'plugin:prettier/recommended',
"prettier"
],
plugins: ['react', '@typescript-eslint'],
env: {
browser: true,
es6: true,
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
'linebreak-style': 'off',
// warns about leftover log/debugger statements when building for Production
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// Rules for working with promises
'promise/always-return': 'warn',
'promise/catch-or-return': 'warn',
'promise/prefer-await-to-then': 'warn',
'promise/prefer-await-to-callbacks': 'warn',
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: ['state'], // reassign `state` param is a common practice in redux-toolkit
},
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/newline-after-import': ['error', { count: 1 }],
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'warn',
'jsx-a11y/aria-role': 'off',
'react/prop-types': 'off',
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
}