tslint.json 6.9 KB

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