tslint.json 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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": true,
  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. "quotemark": false,
  175. "radix": true,
  176. "semicolon": [true, "always"],
  177. "space-before-function-paren": true,
  178. "space-in-parens": [true, "never"],
  179. "strict-boolean-expressions": false,
  180. "switch-default": false,
  181. "ter-arrow-parens": true,
  182. "ter-func-call-spacing": [true, "never"],
  183. "ter-indent": [
  184. true,
  185. 4,
  186. {
  187. "ArrayExpression": 1,
  188. "CallExpression": { "arguments": "first" },
  189. "FunctionDeclaration": { "body": 1, "parameters": 1 },
  190. "FunctionExpression": { "body": 1, "parameters": 1 },
  191. "MemberExpression": 1,
  192. "ObjectExpression": 1,
  193. "outerIIFEBody": 1,
  194. "SwitchCase": 1,
  195. "VariableDeclarator": 1
  196. }
  197. ],
  198. "ter-no-irregular-whitespace": [true],
  199. "ter-no-sparse-arrays": [true],
  200. "trailing-comma": false,
  201. "triple-equals": [
  202. true,
  203. "allow-null-check",
  204. "allow-undefined-check"
  205. ],
  206. "typedef": [
  207. true,
  208. "call-signature",
  209. "parameter",
  210. "arrow-parameter",
  211. "property-declaration",
  212. "variable-declaration",
  213. "member-variable-declaration"
  214. ],
  215. "typedef-whitespace": [
  216. true,
  217. {
  218. "call-signature": "nospace",
  219. "index-signature": "nospace",
  220. "parameter": "nospace",
  221. "property-declaration": "nospace",
  222. "variable-declaration": "nospace"
  223. },
  224. {
  225. "call-signature": "space",
  226. "index-signature": "space",
  227. "parameter": "space",
  228. "property-declaration": "space",
  229. "variable-declaration": "space"
  230. }
  231. ],
  232. "unified-signatures": true,
  233. "use-isnan": true,
  234. "valid-jsdoc": [false, {
  235. "requireReturn": false,
  236. "requireParamDescription": false,
  237. "requireReturnDescription": false
  238. }],
  239. "valid-typeof": true,
  240. "variable-name": false,
  241. "whitespace": [
  242. true,
  243. "check-branch",
  244. "check-decl",
  245. "check-operator",
  246. "check-separator",
  247. "check-type",
  248. "check-type-operator",
  249. "check-rest-spread"
  250. ]
  251. }
  252. }