-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
111 lines (111 loc) · 2.03 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"prettier/react",
"prettier"
],
"plugins": [
"react",
"react-hooks",
"@typescript-eslint"
],
"env": {
"browser": true,
"node": true,
"es6": true
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"page": true,
"browser": true,
"context": true,
"jestPuppeteer": true //https://github.com/smooth-code/jest-puppeteer
},
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"no-undef": "error",
"semi": "warn",
"quotes": [
1,
"single"
],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-unused-vars": "warn",
"comma-dangle": [
"warn",
{
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never"
}
],
"no-console": [
"error",
{
"allow": [
"warn",
"log",
"trace",
"time",
"timeEnd",
"info",
"table",
"error"
]
}
],
"react/prop-types": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-object-literal-type-assertion": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"react/no-children-prop": 0,
"react/self-closing-comp": 1,
"react/display-name": 0,
// 修复interface unused 的问题
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"@typescript-eslint/indent": [
"warn",
"tab"
],
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn"
}
}