.eslintrc.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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-function-return-type": "error",
  31. "@typescript-eslint/explicit-member-accessibility": [
  32. "off",
  33. {
  34. "accessibility": "explicit"
  35. }
  36. ],
  37. "@typescript-eslint/indent": [
  38. "off",
  39. 2,
  40. {
  41. "CallExpression": {
  42. "arguments": "first"
  43. },
  44. "FunctionDeclaration": {
  45. "parameters": "first"
  46. },
  47. "FunctionExpression": {
  48. "parameters": "first"
  49. }
  50. }
  51. ],
  52. "@typescript-eslint/member-delimiter-style": [
  53. "error",
  54. {
  55. "multiline": {
  56. "delimiter": "semi",
  57. "requireLast": true
  58. },
  59. "singleline": {
  60. "delimiter": "comma",
  61. "requireLast": false
  62. }
  63. }
  64. ],
  65. "@typescript-eslint/member-ordering": "off",
  66. "@typescript-eslint/naming-convention": "off",
  67. "@typescript-eslint/no-empty-function": "error",
  68. "@typescript-eslint/no-explicit-any": "off",
  69. "@typescript-eslint/no-inferrable-types": "off",
  70. "@typescript-eslint/no-parameter-properties": "error",
  71. "@typescript-eslint/no-require-imports": "off",
  72. "@typescript-eslint/no-shadow": [
  73. "error",
  74. {
  75. "hoist": "all"
  76. }
  77. ],
  78. "@typescript-eslint/no-unused-expressions": "error",
  79. "@typescript-eslint/no-var-requires": "error",
  80. "@typescript-eslint/prefer-namespace-keyword": "error",
  81. "@typescript-eslint/quotes": [
  82. "error",
  83. "double",
  84. {
  85. "avoidEscape": true
  86. }
  87. ],
  88. "@typescript-eslint/semi": [
  89. "error"
  90. ],
  91. "@typescript-eslint/type-annotation-spacing": "error",
  92. "brace-style": [
  93. "off",
  94. "1tbs"
  95. ],
  96. "comma-dangle": "off",
  97. "curly": "error",
  98. "default-case": "error",
  99. "eol-last": "error",
  100. "eqeqeq": [
  101. "error",
  102. "smart"
  103. ],
  104. "guard-for-in": "error",
  105. // this misfires in Typescript
  106. /*"id-blacklist": [
  107. "error",
  108. "any",
  109. "Number",
  110. "number",
  111. "String",
  112. "string",
  113. "Boolean",
  114. "boolean",
  115. //"Undefined",
  116. //"undefined"
  117. ],*/
  118. "id-match": "error",
  119. "jsdoc/check-alignment": "error",
  120. "jsdoc/check-indentation": "off",
  121. "jsdoc/newline-after-description": "off",
  122. "max-len": [
  123. "error",
  124. {
  125. "code": 160
  126. }
  127. ],
  128. "no-bitwise": "error",
  129. "no-caller": "error",
  130. "no-cond-assign": "error",
  131. "no-console": [
  132. "error",
  133. {
  134. "allow": [
  135. "log",
  136. "warn",
  137. "dir",
  138. "timeLog",
  139. "assert",
  140. "clear",
  141. "count",
  142. "countReset",
  143. "group",
  144. "groupEnd",
  145. "table",
  146. "dirxml",
  147. "error",
  148. "groupCollapsed",
  149. "Console",
  150. "profile",
  151. "profileEnd",
  152. "timeStamp",
  153. "context"
  154. ]
  155. }
  156. ],
  157. "no-debugger": "error",
  158. "no-empty": "error",
  159. "no-eval": "error",
  160. "no-fallthrough": "error",
  161. "no-multiple-empty-lines": "off",
  162. "no-new-wrappers": "error",
  163. "no-null/no-null": "off",
  164. "no-redeclare": "error",
  165. "no-trailing-spaces": "error",
  166. "no-underscore-dangle": "off",
  167. "no-unused-labels": "error",
  168. "no-var": "error",
  169. "prefer-const": "error",
  170. "radix": "error",
  171. "spaced-comment": [
  172. "off",
  173. "always",
  174. {
  175. "markers": [
  176. "/"
  177. ]
  178. }
  179. ],
  180. // using this requires two extra modules: tslint and @typescript-eslint/tslint.
  181. // "@typescript-eslint/tslint/config": [
  182. // "error",
  183. // {
  184. // "rules": {
  185. // "object-literal-sort-keys": true,
  186. // "typedef": [
  187. // true,
  188. // "call-signature",
  189. // "parameter",
  190. // "property-declaration",
  191. // "variable-declaration",
  192. // "member-variable-declaration"
  193. // ],
  194. // "whitespace": [
  195. // true,
  196. // "check-branch",
  197. // "check-decl",
  198. // "check-operator",
  199. // "check-separator",
  200. // "check-type"
  201. // ]
  202. // }
  203. // }
  204. // ]
  205. }
  206. };