tslint.json 4.3 KB

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