tslint.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {
  2. "extends": ["tslint:recommended", "tslint-config-prettier"],
  3. "linterOptions": {
  4. "exclude": [
  5. "node_modules/**/*.ts",
  6. "dist/*.js"
  7. ]
  8. },
  9. "rules": {
  10. "curly": [true, "ignore-same-line"],
  11. "max-classes-per-file": false,
  12. "member-ordering": false,
  13. "no-console": false,
  14. "array-type": [true, "array"],
  15. "object-literal-sort-keys": false,
  16. "no-angle-bracket-type-assertion": true,
  17. "quotemark": [true, "single", "avoid-escape", "avoid-template"],
  18. "semicolon": [true, "always"],
  19. "encoding": true,
  20. "eofline": true,
  21. "arrow-return-shorthand": [true, "multiline"],
  22. "indent": [true, "spaces", 2],
  23. "linebreak-style": [true, "LF"],
  24. "comment-format": [true, "check-lowercase", {"ignore-words": ["TODO", "HACK", "BUG"]}],
  25. "no-require-imports": true,
  26. "no-var-requires": false,
  27. "no-unused-variable": true,
  28. "no-bitwise": false,
  29. "prefer-const": true,
  30. "prefer-method-signature": true,
  31. "trailing-comma": [
  32. true,
  33. {
  34. "multiline": {
  35. "objects": "always",
  36. "arrays": "always",
  37. "functions": "never",
  38. "typeLiterals": "always",
  39. "imports": "never",
  40. "exports": "never"
  41. },
  42. "singleline": "never",
  43. "esSpecCompliant": true
  44. }
  45. ],
  46. "no-consecutive-blank-lines": true,
  47. "no-irregular-whitespace": true,
  48. "no-unnecessary-callback-wrapper": true,
  49. "object-literal-key-quotes": [true, "as-needed"],
  50. "one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace", "check-whitespace"],
  51. "ordered-imports": [
  52. true,
  53. {
  54. "grouped-imports": true,
  55. "import-sources-order": "lowercase-last",
  56. "named-imports-order": "lowercase-first",
  57. "module-source-path": "full"
  58. }
  59. ],
  60. "prefer-while": true,
  61. "space-before-function-paren": [
  62. true,
  63. {
  64. "anonymous": "always",
  65. "named": "never",
  66. "asyncArrow": "always",
  67. "method": "never",
  68. "constructor": "never"
  69. }
  70. ],
  71. "space-within-parens": 0,
  72. "switch-final-break": true,
  73. "whitespace": [
  74. true,
  75. "check-branch",
  76. "check-decl",
  77. "check-operator",
  78. "check-module",
  79. "check-separator",
  80. "check-rest-spread",
  81. "check-type",
  82. "check-typecast",
  83. "check-type-operator"
  84. ]
  85. },
  86. "jsRules": {
  87. "curly": [true, "ignore-same-line"],
  88. "max-classes-per-file": false,
  89. "member-ordering": false,
  90. "no-console": false,
  91. "object-literal-sort-keys": false,
  92. "quotemark": [true, "single", "avoid-escape", "avoid-template"],
  93. "semicolon": [true, "always"],
  94. "encoding": true,
  95. "eofline": true,
  96. "arrow-return-shorthand": [true, "multiline"],
  97. "indent": [true, "spaces", 2],
  98. "linebreak-style": [true, "LF"],
  99. "comment-format": [true, "check-lowercase", {"ignore-words": ["TODO", "HACK", "BUG"]}],
  100. "no-require-imports": true,
  101. "no-var-requires": false,
  102. "no-bitwise": false,
  103. "prefer-const": true,
  104. "trailing-comma": [
  105. true,
  106. {
  107. "multiline": {
  108. "objects": "always",
  109. "arrays": "always",
  110. "functions": "never",
  111. "typeLiterals": "always",
  112. "imports": "never",
  113. "exports": "never"
  114. },
  115. "singleline": "never",
  116. "esSpecCompliant": true
  117. }
  118. ],
  119. "no-consecutive-blank-lines": true,
  120. "no-irregular-whitespace": true,
  121. "no-unnecessary-callback-wrapper": true,
  122. "object-literal-key-quotes": [true, "as-needed"],
  123. "one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace", "check-whitespace"],
  124. "ordered-imports": [
  125. true,
  126. {
  127. "grouped-imports": true,
  128. "import-sources-order": "lowercase-last",
  129. "named-imports-order": "lowercase-first",
  130. "module-source-path": "full"
  131. }
  132. ],
  133. "prefer-while": true,
  134. "space-before-function-paren": [
  135. true,
  136. {
  137. "anonymous": "always",
  138. "named": "never",
  139. "asyncArrow": "always",
  140. "method": "never",
  141. "constructor": "never"
  142. }
  143. ],
  144. "space-within-parens": 0,
  145. "switch-final-break": true,
  146. "whitespace": [
  147. true,
  148. "check-branch",
  149. "check-decl",
  150. "check-operator",
  151. "check-module",
  152. "check-separator",
  153. "check-rest-spread",
  154. "check-type",
  155. "check-typecast",
  156. "check-type-operator"
  157. ]
  158. }
  159. }