-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
.eslintrc.cjs
145 lines (145 loc) · 4.08 KB
/
.eslintrc.cjs
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', 'react'],
settings: {
'import/resolver': {
typescript: {
project: __dirname,
},
},
},
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'linebreak-style': ['error', 'unix'],
'semi': ['error', 'always'],
'array-bracket-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs'],
'camelcase': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': ['error', 'always'],
'constructor-super': 'error',
'consistent-return': 'off',
'curly': 'error',
'dot-notation': 'error',
'eqeqeq': ['error', 'allow-null'],
'eol-last': 'error',
'func-call-spacing': 'error',
'indent': ['error', 'tab', { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-double'],
'key-spacing': 'error',
'keyword-spacing': 'error',
'max-len': ['error', { 'code': 105 }],
'new-cap': ['error', { 'capIsNew': false, 'newIsCap': true }],
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-console': 'warn',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-empty': ['error', { 'allowEmptyCatch': true }],
'no-extra-semi': 'error',
'no-fallthrough': 'off',
'no-lonely-if': 'error',
'no-mixed-requires': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'no-multi-spaces': 'error',
'no-negated-in-lhs': 'error',
'no-nested-ternary': 'error',
'no-new': 'error',
'no-process-exit': 'error',
'no-prototype-builtins': 'off',
'no-redeclare': 'error',
'no-shadow': 'error',
'no-spaced-func': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-underscore-dangle': 'off',
'no-unreachable': 'error',
'no-unused-vars': 'error',
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'one-var': 'off',
'operator-linebreak': [
'error',
'after',
{
'overrides': {
'?': 'before',
':': 'before'
}
}
],
'padded-blocks': ['error', 'never'],
'prefer-const': 'error',
'quote-props': ['error', 'as-needed'],
'quotes': ['error', 'single', 'avoid-escape'],
'semi-spacing': 'error',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': [
'error',
{
'anonymous': 'never',
'asyncArrow': 'always',
'named': 'never'
}
],
'space-in-parens': ['error', 'always'],
'space-infix-ops': ['error', { 'int32Hint': false }],
'space-unary-ops': [
'error',
{
'overrides': {
'!': true
}
}
],
'react/jsx-curly-spacing': [2, 'always'],
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-target-blank': 2,
'react/jsx-no-undef': 2,
'react/jsx-tag-spacing': 2,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/no-danger': 2,
'react/no-deprecated': 2,
'react/no-did-mount-set-state': 2,
'react/no-did-update-set-state': 2,
'react/no-is-mounted': 2,
'react/no-string-refs': 2,
'react/prefer-es6-class': 2,
'react/react-in-jsx-scope': 2,
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 1,
'import/order': [
'error',
{
'groups': ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
'alphabetize': {
'order': 'asc',
'caseInsensitive': true
}
}
]
},
}