tslint.json 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. {
  2. "extends": [
  3. "tslint-eslint-rules"
  4. ],
  5. "rules": {
  6. "adjacent-overload-signatures": true,
  7. "align": [
  8. true,
  9. "parameters",
  10. "statements"
  11. ],
  12. "array-bracket-spacing": [true, "never"],
  13. "arrow-return-shorthand": true,
  14. "ban": [
  15. true,
  16. [ "_", "forEach" ],
  17. [ "_", "each" ],
  18. [ "$", "each" ],
  19. [ "angular", "forEach" ]
  20. ],
  21. "ban-comma-operator": true,
  22. "binary-expression-operand-order": true,
  23. "block-spacing": [true, "always"],
  24. "brace-style": [true, "1tbs"],
  25. "callable-types": true,
  26. "class-name": true,
  27. "comment-format": [
  28. true,
  29. "check-space",
  30. "check-lowercase"
  31. ],
  32. "curly": true,
  33. "cyclomatic-complexity": [true, 10],
  34. "eofline": true,
  35. "forin": true,
  36. "indent": [
  37. true,
  38. "spaces"
  39. ],
  40. "interface-name": [
  41. true,
  42. "always-prefix"
  43. ],
  44. "interface-over-type-literal": true,
  45. "import-spacing": true,
  46. "jsdoc-format": true,
  47. "label-position": true,
  48. "max-classes-per-file": [true, 1],
  49. "member-access": [true],
  50. "member-ordering": [
  51. true,
  52. { "order": "fields-first" }
  53. ],
  54. "new-parens": true,
  55. "newline-per-chained-call": false,
  56. "no-angle-bracket-type-assertion": false,
  57. "no-any": false,
  58. "no-arg": true,
  59. "no-bitwise": true,
  60. "no-conditional-assignment": true,
  61. "no-consecutive-blank-lines": true,
  62. "no-console": [
  63. true,
  64. "debug",
  65. "info",
  66. "time",
  67. "timeEnd",
  68. "trace"
  69. ],
  70. "no-constant-condition": true,
  71. "no-construct": true,
  72. "no-control-regex": true,
  73. "no-debugger": true,
  74. "no-default-export": true,
  75. "no-duplicate-case": true,
  76. "no-duplicate-super": true,
  77. "no-duplicate-switch-case": true,
  78. "no-duplicate-variable": true,
  79. "no-dynamic-delete": true,
  80. "no-empty": false,
  81. "no-empty-character-class": true,
  82. "no-empty-interface": true,
  83. "no-eval": false,
  84. "no-ex-assign": true,
  85. "no-extra-boolean-cast": true,
  86. "no-extra-semi": true,
  87. "no-inferrable-types": false,
  88. "no-inner-declarations": [true, "both"],
  89. "no-implicit-dependencies": false,
  90. "no-internal-module": true,
  91. "no-invalid-regexp": true,
  92. "no-invalid-this": true,
  93. "no-misused-new": true,
  94. "no-multi-spaces": [true],
  95. "no-namespace": true,
  96. "no-null-keyword": false,
  97. "no-parameter-properties": true,
  98. "no-parameter-reassignment": false,
  99. "no-redundant-jsdoc": false,
  100. "no-reference": true,
  101. "no-reference-import": true,
  102. "no-regex-spaces": true,
  103. "no-require-imports": true,
  104. "no-shadowed-variable": true,
  105. "no-string-literal": true,
  106. "no-string-throw": true,
  107. "no-submodule-imports": true,
  108. "no-switch-case-fall-through": false,
  109. "no-trailing-whitespace": [true, "ignore-blank-lines"],
  110. "no-unnecessary-callback-wrapper": true,
  111. "no-unnecessary-class": [true, "allow-static-only"],
  112. "no-unnecessary-initializer": true,
  113. "no-unexpected-multiline": true,
  114. "no-unsafe-finally": true,
  115. "no-unused-expression": true,
  116. "no-use-before-declare": true,
  117. "no-var-keyword": true,
  118. "no-var-requires": true,
  119. "max-file-line-count": [true, 500],
  120. "object-curly-spacing": [true, "always"],
  121. "object-literal-sort-keys": false,
  122. "one-line": [
  123. true,
  124. "check-open-brace",
  125. "check-catch",
  126. "check-else",
  127. "check-finally",
  128. "check-whitespace"
  129. ],
  130. "one-variable-per-declaration": true,
  131. "only-arrow-functions": [true, "allow-declarations"],
  132. "ordered-imports": [
  133. true,
  134. {
  135. "import-sources-order": "any",
  136. "grouped-imports": true,
  137. "named-imports-order": "case-insensitive"
  138. }
  139. ],
  140. "prefer-const": true,
  141. "prefer-method-signature": true,
  142. "prefer-readonly": true,
  143. "prefer-template": true,
  144. "quotemark": false,
  145. "radix": true,
  146. "semicolon": [true, "always"],
  147. "space-before-function-paren": true,
  148. "space-in-parens": [true, "never"],
  149. "switch-default": false,
  150. "ter-arrow-parens": true,
  151. "ter-func-call-spacing": [true, "never"],
  152. "ter-indent": [
  153. true,
  154. 4,
  155. {
  156. "ArrayExpression": 1,
  157. "CallExpression": { "arguments": "first" },
  158. "FunctionDeclaration": { "body": 1, "parameters": 1 },
  159. "FunctionExpression": { "body": 1, "parameters": 1 },
  160. "MemberExpression": 1,
  161. "ObjectExpression": 1,
  162. "outerIIFEBody": 1,
  163. "SwitchCase": 1,
  164. "VariableDeclarator": 1
  165. }
  166. ],
  167. "ter-no-irregular-whitespace": [true],
  168. "ter-no-sparse-arrays": [true],
  169. "trailing-comma": false,
  170. "triple-equals": [
  171. true,
  172. "allow-null-check",
  173. "allow-undefined-check"
  174. ],
  175. "typedef": [
  176. true,
  177. "call-signature",
  178. "parameter",
  179. "arrow-parameter",
  180. "property-declaration",
  181. "variable-declaration",
  182. "member-variable-declaration"
  183. ],
  184. "typedef-whitespace": [
  185. true,
  186. {
  187. "call-signature": "nospace",
  188. "index-signature": "nospace",
  189. "parameter": "nospace",
  190. "property-declaration": "nospace",
  191. "variable-declaration": "nospace"
  192. },
  193. {
  194. "call-signature": "space",
  195. "index-signature": "space",
  196. "parameter": "space",
  197. "property-declaration": "space",
  198. "variable-declaration": "space"
  199. }
  200. ],
  201. "unified-signatures": true,
  202. "use-isnan": true,
  203. "valid-jsdoc": [false, {
  204. "requireReturn": false,
  205. "requireParamDescription": false,
  206. "requireReturnDescription": false
  207. }],
  208. "valid-typeof": true,
  209. "variable-name": false,
  210. "whitespace": [
  211. true,
  212. "check-branch",
  213. "check-decl",
  214. "check-operator",
  215. "check-separator",
  216. "check-type",
  217. "check-type-operator",
  218. "check-rest-spread"
  219. ]
  220. }
  221. }