-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtslint.json
64 lines (63 loc) · 1.86 KB
/
tslint.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
{
"extends": "tslint-config-alloy",
"rules": {
"no-parameter-properties": false,
// 禁止给类的构造函数的参数添加修饰符
"triple-equals": false,
"no-debugger": false,
// 禁止行尾有空格
"no-trailing-whitespace": false,
"member-ordering": false,
"no-this-assignment": [
true,
{
"allowed-names": [
"^self$",
"^that$"
],
"allow-destructuring": true
}
],
// 必须使用箭头函数,除非是单独的函数声明或是命名函数
"only-arrow-functions": [
false,
"allow-declarations",
"allow-named-functions"
],
// 禁止出现空代码块,允许 catch 是空代码块
"no-empty": [
false,
"allow-empty-catch"
],
// 禁止无用的类型断言
"no-unnecessary-type-assertion": false,
// 使用 return; 而不是 return undefined;
"return-undefined": false,
// 禁止对 array 使用 for in 循环
"no-for-in-array": false,
// 单行注释格式化规则
"comment-format": [
true,
"check-space"
],
// 限制换行符为 LF 或 CRLF
"linebreak-style": [
true,
"CRLF"
],
// 箭头函数的参数必须有小括号
"arrow-parens": false,
// 限制对象、数组、解构赋值等的最后一项末尾是否需要逗号
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"ordered-imports": false
},
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules"
]
}