-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
89 lines (87 loc) · 2.96 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
module.exports = {
env: {
browser: true,
node: true,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
],
plugins: ['react', 'unused-imports'],
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
rules: {
'unused-imports/no-unused-imports': 'warn',
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
'comma-spacing': ['error', {before: false, after: true}],
curly: ['error'],
'dot-location': ['error', 'property'],
'dot-notation': ['error'],
'eol-last': ['error'],
eqeqeq: ['error'],
indent: ['error', 2, {SwitchCase: 0, VariableDeclarator: 1}],
'jsx-quotes': ['error', 'prefer-double'],
'keyword-spacing': ['error'],
'no-case-declarations': [0],
'no-console': [1, {allow: ['warn', 'error']}],
'no-debugger': [1],
'no-empty': ['error'],
'no-extend-native': ['error'],
'no-extra-semi': ['error'],
'no-multi-spaces': ['error'],
'no-restricted-syntax': ['error', 'WithStatement'],
'no-sparse-arrays': ['error'],
'no-trailing-spaces': ['error'],
'no-unexpected-multiline': ['error'],
'no-unneeded-ternary': ['error'],
'no-unreachable': ['error'],
'no-unsafe-finally': ['error'],
'no-unused-vars': ['error'],
quotes: ['error', 'single', 'avoid-escape'],
semi: ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'use-isnan': ['error'],
'valid-typeof': ['error'],
'react/jsx-indent': ['error', 2],
'react/jsx-no-duplicate-props': ['error'],
'react/jsx-uses-react': ['error'],
'react/jsx-uses-vars': ['error'],
'react/no-access-state-in-setstate': ['error'],
'react/no-children-prop': ['error'],
'react/no-deprecated': [1],
'react/no-danger-with-children': ['error'],
'react/no-did-mount-set-state': ['error'],
'react/no-did-update-set-state': ['error'],
'react/no-direct-mutation-state': ['error'],
'react/no-render-return-value': ['error'],
'react/no-typos': ['error'],
'react/no-unescaped-entities': ['error'],
'react/no-unknown-property': ['error'],
'react/no-unused-prop-types': [1],
'react/no-unused-state': ['error'],
'react/no-will-update-set-state': ['error'],
'react/prop-types': ['error'],
'react/require-default-props': [1],
'react/require-render-return': ['error'],
'react/self-closing-comp': ['error', {'component': true, 'html': false}],
'react/sort-comp': ['error'],
'react/sort-prop-types': ['error'],
'react/void-dom-elements-no-children': ['error']
},
};