-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
52 lines (49 loc) · 1.8 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
module.exports = {
root: true,
env: { browser: true, es2020: true },
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-hooks', '@typescript-eslint', 'deprecation'],
rules: {
'import/no-unused-modules': 'off',
'@typescript-eslint/no-floating-promises': ['warn'],
'@typescript-eslint/no-unnecessary-type-assertion': ['warn'],
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-unsafe-assignment': [0],
'@typescript-eslint/no-unsafe-return': [0],
'@typescript-eslint/no-unsafe-call': [0],
'@typescript-eslint/no-unnecessary-condition': ['off'],
'@typescript-eslint/no-unsafe-member-access': [0],
'@typescript-eslint/restrict-template-expressions': [0],
'@typescript-eslint/explicit-module-boundary-types': ['warn'],
'@typescript-eslint/no-unnecessary-type-constraint': ['warn'],
'@typescript-eslint/no-non-null-asserted-optional-chain': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/ban-types': ['error'],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/quotes': [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'deprecation/deprecation': ['warn'],
'no-console': ['warn'],
'no-warning-comments': [0],
'react-hooks/rules-of-hooks': ['error'],
'react-hooks/exhaustive-deps': ['warn'],
},
};