.eslintrc.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*
  2. 👋 Hi! This file was autogenerated by tslint-to-eslint-config.
  3. https://github.com/typescript-eslint/tslint-to-eslint-config
  4. It represents the closest reasonable ESLint configuration to this
  5. project's original TSLint configuration.
  6. We recommend eventually switching this configuration to extend from
  7. the recommended rulesets in typescript-eslint.
  8. https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
  9. Happy linting! 💖
  10. */
  11. module.exports = {
  12. "env": {
  13. "browser": true,
  14. "es6": true,
  15. "node": true
  16. },
  17. "parser": "@typescript-eslint/parser",
  18. "parserOptions": {
  19. "project": "tsconfig.json",
  20. "sourceType": "module"
  21. },
  22. "plugins": [
  23. "eslint-plugin-jsdoc",
  24. "eslint-plugin-no-null",
  25. "@typescript-eslint",
  26. "@typescript-eslint/tslint"
  27. ],
  28. "rules": {
  29. "@typescript-eslint/dot-notation": "error",
  30. "@typescript-eslint/explicit-member-accessibility": [
  31. "off",
  32. {
  33. "accessibility": "explicit"
  34. }
  35. ],
  36. "@typescript-eslint/indent": [
  37. "off",
  38. 2,
  39. {
  40. "CallExpression": {
  41. "arguments": "first"
  42. },
  43. "FunctionDeclaration": {
  44. "parameters": "first"
  45. },
  46. "FunctionExpression": {
  47. "parameters": "first"
  48. }
  49. }
  50. ],
  51. "@typescript-eslint/member-delimiter-style": [
  52. "error",
  53. {
  54. "multiline": {
  55. "delimiter": "none",
  56. "requireLast": true
  57. },
  58. "singleline": {
  59. "delimiter": "comma",
  60. "requireLast": false
  61. }
  62. }
  63. ],
  64. "@typescript-eslint/member-ordering": "off",
  65. "@typescript-eslint/naming-convention": "off",
  66. "@typescript-eslint/no-empty-function": "error",
  67. "@typescript-eslint/no-explicit-any": "off",
  68. "@typescript-eslint/no-inferrable-types": "off",
  69. "@typescript-eslint/no-parameter-properties": "error",
  70. "@typescript-eslint/no-require-imports": "off",
  71. "@typescript-eslint/no-shadow": [
  72. "error",
  73. {
  74. "hoist": "all"
  75. }
  76. ],
  77. "@typescript-eslint/no-unused-expressions": "error",
  78. "@typescript-eslint/no-var-requires": "error",
  79. "@typescript-eslint/prefer-namespace-keyword": "error",
  80. "@typescript-eslint/quotes": [
  81. "error",
  82. "double",
  83. {
  84. "avoidEscape": true
  85. }
  86. ],
  87. "@typescript-eslint/semi": [
  88. "error"
  89. ],
  90. "@typescript-eslint/type-annotation-spacing": "error",
  91. "brace-style": [
  92. "off",
  93. "1tbs"
  94. ],
  95. "comma-dangle": "off",
  96. "curly": "error",
  97. "default-case": "error",
  98. "eol-last": "error",
  99. "eqeqeq": [
  100. "error",
  101. "smart"
  102. ],
  103. "guard-for-in": "error",
  104. // this misfires in Typescript
  105. /*"id-blacklist": [
  106. "error",
  107. "any",
  108. "Number",
  109. "number",
  110. "String",
  111. "string",
  112. "Boolean",
  113. "boolean",
  114. //"Undefined",
  115. //"undefined"
  116. ],*/
  117. "id-match": "error",
  118. "jsdoc/check-alignment": "error",
  119. "jsdoc/check-indentation": "error",
  120. "jsdoc/newline-after-description": "off",
  121. "max-len": [
  122. "error",
  123. {
  124. "code": 160
  125. }
  126. ],
  127. "no-bitwise": "error",
  128. "no-caller": "error",
  129. "no-cond-assign": "error",
  130. "no-console": [
  131. "error",
  132. {
  133. "allow": [
  134. "log",
  135. "warn",
  136. "dir",
  137. "timeLog",
  138. "assert",
  139. "clear",
  140. "count",
  141. "countReset",
  142. "group",
  143. "groupEnd",
  144. "table",
  145. "dirxml",
  146. "error",
  147. "groupCollapsed",
  148. "Console",
  149. "profile",
  150. "profileEnd",
  151. "timeStamp",
  152. "context"
  153. ]
  154. }
  155. ],
  156. "no-debugger": "error",
  157. "no-empty": "error",
  158. "no-eval": "error",
  159. "no-fallthrough": "error",
  160. "no-multiple-empty-lines": "off",
  161. "no-new-wrappers": "error",
  162. "no-null/no-null": "error",
  163. "no-redeclare": "error",
  164. "no-trailing-spaces": "error",
  165. "no-underscore-dangle": "error",
  166. "no-unused-labels": "error",
  167. "no-var": "error",
  168. "prefer-const": "error",
  169. "radix": "error",
  170. "spaced-comment": [
  171. "off",
  172. "always",
  173. {
  174. "markers": [
  175. "/"
  176. ]
  177. }
  178. ],
  179. "@typescript-eslint/tslint/config": [
  180. "error",
  181. {
  182. "rules": {
  183. "object-literal-sort-keys": true,
  184. "typedef": [
  185. true,
  186. "call-signature",
  187. "parameter",
  188. "property-declaration",
  189. "variable-declaration",
  190. "member-variable-declaration"
  191. ],
  192. "whitespace": [
  193. true,
  194. "check-branch",
  195. "check-decl",
  196. "check-operator",
  197. "check-separator",
  198. "check-type"
  199. ]
  200. }
  201. }
  202. ]
  203. }
  204. };