tslint.json 4.2 KB

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