1.0.2 • Published 3 years ago

eslint-plugin-thsjs v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

eslint-plugin-thsjs

1. no-delete-array

sonar: "delete" should not be used on arrays 不能将delete应用于数组。

2. no-amend-for-counter

sonar: "for" loop increment clauses should modify the loops' counters for循环中定义的变量必须在表达式中更新和判断

3. no-future-identifiers

sonar: "future reserved words" should not be used as identifiers 保留字不能作为变量名

4. no-else-if-end

sonar: "if ... else if" constructs should end with "else" clauses if...else if结构应该以一个else结尾

5. no-in-primitive-type

sonar: "in" should not be used with primitive types in不应该使用在原始类型上

6. no-indexof-greater-zero

sonar: "indexOf" checks should not be for positive numbers indexOf检查应该 >= 0 ()

7. new 操作符只能作用于函数 todo

8. 已存在eslint constructor-super

9. sonarjs/no-nested-switch

sonar: "switch" statements should not be nested switch语句不能嵌套

10. sonarjs/max-switch-cases

sonar: "switch" statements should not have too many "case" clauses switch语句不能有过多的case

11. 内置函数的参数应与记录的类型匹配(no-arguments-type)todo

12. 算数运算符只能作用于数字todo

13. 数组索引需要的是数字类型 (no-arrays-mutating)todo

14. no-arrays-mutating

sonar: Array-mutating methods should not be used misleadingly 不要错误地使用可以改变数组本身的方法

15. no-assignments-redundant

sonar: Assignments should not be redundant 不应该有多余的赋值语句

16. sonarjs/no-gratuitous-expressions

sonar: Boolean expressions should not be gratuitous 布尔值表达式应该是合理的

17. no-switch-case

sonar: Comma and logical OR operators should not be used in switch cases 逗号和逻辑或不应该出现在switch的case中

18. no-for-equality

sonar: Equality operators should not be used in "for" loop termination conditions 等号运算不能用于for循环的结束条件