tslint-rules.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. {
  2. "adjacent-overload-signatures": true,
  3. "ban-types": false,
  4. "member-access": [true, "check-accessor", "check-constructor", "check-parameter-property"],
  5. "member-ordering": [
  6. true,
  7. {
  8. "order": [
  9. "public-static-field",
  10. "protected-static-field",
  11. "private-static-field",
  12. "public-static-method",
  13. "protected-static-method",
  14. "private-static-method",
  15. "public-instance-field",
  16. "protected-instance-field",
  17. "private-instance-field",
  18. "public-constructor",
  19. "protected-constructor",
  20. "private-constructor",
  21. "public-instance-method",
  22. "protected-instance-method",
  23. "private-instance-method"
  24. ]
  25. }
  26. ],
  27. "no-any": false,
  28. "no-empty-interface": true,
  29. "no-import-side-effect": [true, { "ignore-module": "(\\.css|\\.less|\\.sass|\\.scss)$" }],
  30. "no-inferrable-types": true,
  31. "no-internal-module": true,
  32. "no-magic-numbers": [true, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 10000],
  33. "no-namespace": [true, "allow-declarations"],
  34. "no-non-null-assertion": true,
  35. "no-parameter-reassignment": true,
  36. "no-reference": true,
  37. "no-unnecessary-type-assertion": false,
  38. "no-var-requires": true,
  39. "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
  40. "prefer-for-of": true,
  41. "promise-function-async": false,
  42. "typedef": false,
  43. "typedef-whitespace": [
  44. true,
  45. {
  46. "call-signature": "nospace",
  47. "index-signature": "nospace",
  48. "parameter": "nospace",
  49. "property-declaration": "nospace",
  50. "variable-declaration": "nospace"
  51. },
  52. {
  53. "call-signature": "onespace",
  54. "index-signature": "onespace",
  55. "parameter": "onespace",
  56. "property-declaration": "onespace",
  57. "variable-declaration": "onespace"
  58. }
  59. ],
  60. "unified-signatures": true,
  61. "await-promise": false,
  62. "ban": false,
  63. "ban-comma-operator": true,
  64. "curly": [true, "ignore-same-line"],
  65. "forin": true,
  66. "import-blacklist": false,
  67. "label-position": false,
  68. "no-arg": true,
  69. "no-bitwise": false,
  70. "no-conditional-assignment": true,
  71. "no-console": false,
  72. "no-construct": true,
  73. "no-debugger": false,
  74. "no-duplicate-super": true,
  75. "no-duplicate-switch-case": true,
  76. "no-duplicate-variable": [true, "check-parameters"],
  77. "no-dynamic-delete": false,
  78. "no-empty": [true, "allow-empty-catch", "allow-empty-functions"],
  79. "no-eval": true,
  80. "no-floating-promises": false,
  81. "no-for-in-array": false,
  82. "no-implicit-dependencies": [true, "dev"],
  83. "no-inferred-empty-object-type": false,
  84. "no-invalid-template-strings": true,
  85. "no-invalid-this": true,
  86. "no-misused-new": false,
  87. "no-null-keyword": false,
  88. "no-object-literal-type-assertion": true,
  89. "no-return-await": false,
  90. "no-shadowed-variable": false,
  91. "no-sparse-arrays": true,
  92. "no-string-literal": true,
  93. "no-string-throw": true,
  94. "no-submodule-imports": false,
  95. "no-switch-case-fall-through": true,
  96. "no-this-assignment": [true, { "allow-destructuring": true }],
  97. "no-unbound-method": false,
  98. "no-unnecessary-class": false,
  99. "no-unsafe-any": false,
  100. "no-unsafe-finally": true,
  101. "no-unused-expression": true,
  102. "no-use-before-declare": false,
  103. "no-var-keyword": true,
  104. "no-void-expression": false,
  105. "prefer-conditional-expression": false,
  106. "prefer-object-spread": true,
  107. "radix": true,
  108. "restrict-plus-operands": false,
  109. "strict-boolean-expressions": false,
  110. "strict-type-predicates": false,
  111. "switch-default": false,
  112. "triple-equals": true,
  113. "typeof-compare": false,
  114. "use-default-type-parameter": false,
  115. "use-isnan": true,
  116. "cyclomatic-complexity": [true, 20],
  117. "deprecation": false,
  118. "eofline": true,
  119. "indent": [true, "spaces", 4],
  120. "linebreak-style": [true, "LF"],
  121. "max-classes-per-file": false,
  122. "max-file-line-count": false,
  123. "max-line-length": false,
  124. "no-default-export": false,
  125. "no-duplicate-imports": true,
  126. "no-mergeable-namespace": true,
  127. "no-require-imports": false,
  128. "object-literal-sort-keys": false,
  129. "prefer-const": false,
  130. "prefer-readonly": false,
  131. "trailing-comma": [true, { "multiline": "never", "singleline": "never" }],
  132. "align": false,
  133. "array-type": false,
  134. "arrow-parens": true,
  135. "arrow-return-shorthand": true,
  136. "binary-expression-operand-order": false,
  137. "callable-types": true,
  138. "class-name": true,
  139. "comment-format": [true, "check-space"],
  140. "completed-docs": false,
  141. "encoding": true,
  142. "file-header": false,
  143. "file-name-casing": false,
  144. "import-spacing": true,
  145. "interface-name": false,
  146. "interface-over-type-literal": true,
  147. "jsdoc-format": [true, "check-multiline-start"],
  148. "match-default-export-name": false,
  149. "new-parens": true,
  150. "newline-before-return": false,
  151. "newline-per-chained-call": false,
  152. "no-angle-bracket-type-assertion": true,
  153. "no-boolean-literal-compare": false,
  154. "no-consecutive-blank-lines": [true, 3],
  155. "no-irregular-whitespace": true,
  156. "no-parameter-properties": true,
  157. "no-redundant-jsdoc": true,
  158. "no-reference-import": true,
  159. "no-trailing-whitespace": true,
  160. "no-unnecessary-callback-wrapper": false,
  161. "no-unnecessary-initializer": true,
  162. "no-unnecessary-qualifier": false,
  163. "number-literal-format": true,
  164. "object-literal-key-quotes": false,
  165. "object-literal-shorthand": true,
  166. "one-line": true,
  167. "one-variable-per-declaration": [true, "ignore-for-loop"],
  168. "ordered-imports": true,
  169. "prefer-function-over-method": false,
  170. "prefer-method-signature": false,
  171. "prefer-switch": false,
  172. "prefer-template": false,
  173. "prefer-while": false,
  174. "quotemark": [true, "single", "jsx-double", "avoid-template", "avoid-escape"],
  175. "return-undefined": false,
  176. "semicolon": [true, "always"],
  177. "space-before-function-paren": [true, "asyncArrow"],
  178. "space-within-parens": [true, 0],
  179. "switch-final-break": false,
  180. "type-literal-delimiter": true,
  181. "variable-name": false,
  182. "whitespace": [
  183. true,
  184. "check-branch",
  185. "check-decl",
  186. "check-operator",
  187. "check-module",
  188. "check-separator",
  189. "check-rest-spread",
  190. "check-type",
  191. "check-typecast",
  192. "check-type-operator",
  193. "check-preblock"
  194. ]
  195. }