-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
44 lines (44 loc) · 1.06 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
{
"extends": ["standard", "prettier"],
"plugins": ["prettier", "standard"],
"overrides": [
{
"files": ["*.js"],
"parser": "babel-eslint"
},
{
"files": ["*.ts"],
"extends": ["prettier/@typescript-eslint", "standard", "plugin:prettier/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"]
}
],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 100,
"singleQuote": true,
"semi": true
}
],
"no-new": 0, // 禁止在使用new构造一个实例后不赋值
"eqeqeq": 0, // 使用 === 和 !==
"prefer-promise-reject-errors": 0, // 使用error对象作为Promise驳回原因
"no-proto": 0, // 禁止使用__proto__
"camelcase": 0, // 强制驼峰命名
"no-useless-call": 0, // 禁止非必要的call和apply 待确认
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"globals": {
},
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
}
}