UNPKG
tslint-config-alloy
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.0
AlloyTeam TSLint 规则
github.com/AlloyTeam/tslint-config-alloy
AlloyTeam/tslint-config-alloy
tslint-config-alloy
/
test
/
prefer-for-of
/
tslint.json
11 lines
(10 loc)
•
320 B
JSON
View Raw
1
2
3
4
5
6
7
8
9
10
11
{
"rules"
:
{
"prefer-for-of"
:
true
}
,
"meta"
:
{
"category"
:
"typescript-specific"
,
"description"
:
"使用 `for` 循环遍历数组时,如果 `index` 仅用于获取成员,则必须使用 `for of` 循环替代 `for` 循环"
,
"reason"
:
"`for of` 循环更加易读"
}
}