You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

226 lines
5.0 KiB

  1. {
  2. "env": {
  3. "es6": true,
  4. "node": true
  5. },
  6. "extends": [
  7. "eslint:recommended",
  8. "plugin:@typescript-eslint/recommended",
  9. "plugin:@typescript-eslint/recommended-requiring-type-checking",
  10. "plugin:@typescript-eslint/eslint-recommended",
  11. "plugin:import/errors",
  12. "plugin:import/warnings",
  13. "plugin:import/typescript",
  14. "prettier",
  15. "prettier/@typescript-eslint"
  16. ],
  17. "parser": "@typescript-eslint/parser",
  18. "parserOptions": {
  19. "ecmaVersion": 2018,
  20. "sourceType": "module",
  21. "ecmaFeatures": {
  22. "impliedStrict": true,
  23. "jsx": true
  24. },
  25. "project": "tsconfig.json",
  26. "extraFileExtensions": [
  27. ".ts",
  28. ".tsx"
  29. ]
  30. },
  31. "plugins": [
  32. "import",
  33. "@typescript-eslint"
  34. ],
  35. "rules": {
  36. "no-prototype-builtins": "off",
  37. "@typescript-eslint/explicit-module-boundary-types": "off",
  38. "arrow-parens": [
  39. "off"
  40. ],
  41. "brace-style": [
  42. "off",
  43. "stroustrup"
  44. ],
  45. "consistent-return": "off",
  46. "camelcase": "off",
  47. "@typescript-eslint/camelcase": "off",
  48. "curly": [
  49. "error",
  50. "multi-line",
  51. "consistent"
  52. ],
  53. "eol-last": "error",
  54. "linebreak-style": [
  55. "error",
  56. "unix"
  57. ],
  58. "new-parens": "error",
  59. "no-console": "off",
  60. "no-constant-condition": [
  61. "warn",
  62. {
  63. "checkLoops": false
  64. }
  65. ],
  66. "no-caller": "error",
  67. "no-debugger": "warn",
  68. "no-dupe-class-members": "off",
  69. "no-duplicate-imports": "error",
  70. "no-else-return": "warn",
  71. "no-empty": [
  72. "warn",
  73. {
  74. "allowEmptyCatch": true
  75. }
  76. ],
  77. "no-eval": "error",
  78. "no-ex-assign": "warn",
  79. "no-extend-native": "error",
  80. "no-extra-bind": "error",
  81. "no-floating-decimal": "error",
  82. "no-implicit-coercion": "error",
  83. "no-implied-eval": "error",
  84. // Turn off until fix for: https://github.com/typescript-eslint/typescript-eslint/issues/239
  85. "no-inner-declarations": "off",
  86. "no-lone-blocks": "error",
  87. "no-lonely-if": "error",
  88. "no-loop-func": "error",
  89. "no-multi-spaces": "error",
  90. "no-return-assign": "error",
  91. "no-return-await": "warn",
  92. "no-self-compare": "error",
  93. "no-sequences": "error",
  94. "no-template-curly-in-string": "warn",
  95. "no-throw-literal": "error",
  96. "no-unmodified-loop-condition": "warn",
  97. "no-unneeded-ternary": "error",
  98. "no-unused-expressions": [
  99. "warn",
  100. {
  101. "allowShortCircuit": true
  102. }
  103. ],
  104. "no-use-before-define": "off",
  105. "no-useless-call": "error",
  106. "no-useless-catch": "error",
  107. "no-useless-computed-key": "error",
  108. "no-useless-concat": "error",
  109. "no-useless-rename": "error",
  110. "no-useless-return": "error",
  111. "no-var": "error",
  112. "no-with": "error",
  113. "object-shorthand": "off",
  114. "one-var": [
  115. "error",
  116. "never"
  117. ],
  118. "prefer-arrow-callback": "error",
  119. "prefer-const": "error",
  120. "prefer-numeric-literals": "error",
  121. "prefer-object-spread": "error",
  122. "prefer-rest-params": "error",
  123. "prefer-spread": "error",
  124. "prefer-template": "error",
  125. "quotes": "off",
  126. // Turn off until fix for: https://github.com/eslint/eslint/issues/11899
  127. "require-atomic-updates": "off",
  128. "semi": [
  129. "error",
  130. "always"
  131. ],
  132. "semi-style": [
  133. "error",
  134. "last"
  135. ],
  136. "sort-imports": [
  137. "error",
  138. {
  139. "ignoreCase": true,
  140. "ignoreDeclarationSort": true,
  141. "ignoreMemberSort": false,
  142. "memberSyntaxSortOrder": [
  143. "none",
  144. "all",
  145. "multiple",
  146. "single"
  147. ]
  148. }
  149. ],
  150. "yoda": "error",
  151. "import/export": "off",
  152. "import/extensions": [
  153. "error",
  154. "never"
  155. ],
  156. "import/named": "off",
  157. "import/namespace": "off",
  158. "import/newline-after-import": "warn",
  159. "import/no-cycle": "off",
  160. "import/no-dynamic-require": "error",
  161. "import/no-default-export": "off",
  162. "import/no-duplicates": "error",
  163. "import/no-self-import": "error",
  164. "import/no-unresolved": [
  165. "warn",
  166. {
  167. "ignore": [
  168. "vscode"
  169. ]
  170. }
  171. ],
  172. "import/order": [
  173. "warn",
  174. {
  175. "groups": [
  176. "builtin",
  177. "external",
  178. "internal",
  179. [
  180. "index",
  181. "sibling",
  182. "parent"
  183. ]
  184. ]
  185. }
  186. ],
  187. "@typescript-eslint/require-await": "off",
  188. "@typescript-eslint/consistent-type-assertions": "off",
  189. "@typescript-eslint/explicit-function-return-type": "off",
  190. "@typescript-eslint/explicit-member-accessibility": "error",
  191. "@typescript-eslint/interface-name-prefix": "off",
  192. "@typescript-eslint/no-empty-function": [
  193. "warn",
  194. {
  195. "allow": [
  196. "constructors"
  197. ]
  198. }
  199. ],
  200. "@typescript-eslint/no-empty-interface": "off",
  201. "@typescript-eslint/no-explicit-any": "error",
  202. "@typescript-eslint/no-inferrable-types": [
  203. "warn",
  204. {
  205. "ignoreParameters": true,
  206. "ignoreProperties": true
  207. }
  208. ],
  209. "@typescript-eslint/no-misused-promises": [
  210. "error",
  211. {
  212. "checksVoidReturn": false
  213. }
  214. ],
  215. "@typescript-eslint/no-namespace": "off",
  216. "@typescript-eslint/no-non-null-assertion": "off",
  217. "@typescript-eslint/no-parameter-properties": "off",
  218. "@typescript-eslint/no-unused-vars": [
  219. "warn",
  220. {
  221. "args": "none"
  222. }
  223. ],
  224. "@typescript-eslint/no-use-before-define": "off",
  225. "@typescript-eslint/unbound-method": "off" // Too many bugs right now: https://github.com/typescript-eslint/typescript-eslint/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+unbound-method
  226. }
  227. }