-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
70 lines (70 loc) · 2.24 KB
/
.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
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb-base"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"nonblock-statement-body-position":0,
"curly":0,
"import/prefer-default-export":0,
"linebreak-style":0,
"quotes":0,
"no-dupe-class-members":0,
"import/no-dynamic-require":0,
"global-require":0,
"no-useless-constructor":0,
"prefer-destructuring":0,
"no-mixed-operators":0,
"no-nested-ternary":0,
"new-cap":0,
"camelcase":0, // 允许非驼峰命名
"guard-for-in":0,
"consistent-return":0,
"no-await-in-loop":0,
"implicit-arrow-linebreak":0,
"no-continue":0,
"no-empty":0,
"no-multi-assign":0,
"no-new":0,
"no-new-func":0,
"no-proto":0,
"no-unused-vars":0,
"default-case":0,
"no-bitwise":0,
"no-return-assign": 0,
"no-param-reassign":0,
"no-promise-executor-return":0,
"eqeqeq":0, // 允许使用 ==
"func-names":0, // 允许赋值给函数参数
"no-restricted-syntax": 0,
"no-plusplus":0, // 允许使用i++
"no-return-await":0,
"no-shadow":0,
"max-len": 0,
"no-undef": 0, // 允许直接使用全局变量
"max-classes-per-file": 0,
"no-use-before-define": 0, // 允许在定义前使用
"no-eval": 0,
"no-dynamic-require": 0, // 运行使用动态require
"import/no-import-module-exports": 0, // 运行在cjm使用import
"semi": [2, "never"], // 不允许无效分号
"no-console": 0, // 运行使用console
"lines-between-class-members": 0, // 类成员直接必须空行
"import/extensions": 0,
"no-underscore-dangle": 0, // 允许_标识私有变量
"class-methods-use-this": 0, // 不强制类函数使用this
"import/no-unresolved": 0, // 允许导入时不使用完整扩展名
"@typescript-eslint/no-unused-vars": 1 // 使用Ts 检查 unused-vars
}
}