-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.53 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
module.exports = {
env: {
browser: true,
node: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
'no-console': 'error',
'default-case': 'error',
'default-case-last': 'error',
'@typescript-eslint/default-param-last': 'error',
eqeqeq: 'error',
'dot-notation': 'error',
'no-else-return': 'error',
'consistent-return': 'error',
'@typescript-eslint/no-magic-numbers': [
'error',
{ ignoreArrayIndexes: true, ignore: [0, 1, 2], ignoreDefaultValues: true },
],
'no-return-assign': 'error',
'no-return-await': 'error',
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
'no-param-reassign': ['error', { props: true }],
'@typescript-eslint/no-shadow': 'error',
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
ignoreRestSiblings: true,
args: 'after-used',
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
};