tslint.json 4.3 KB

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