-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.json
42 lines (42 loc) · 984 Bytes
/
.eslintrc.json
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
{
// eslint-disable-next-line 注释可以取消掉下一行检查
"env": {
"browser": true,
"es2020": true,
"es6": true,
"node": true,
"commonjs": true
},
"globals": {
"define": "readonly"
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-var": "warn",
"semi": "warn",
"no-unused-vars": "off",
"quotes": ["warn", "single", { "avoidEscape": true }],
"prettier/prettier": [
"warn",
{
"endOfLine": "auto",
"printWidth": 120
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"]
}
]
}