.eslintrc.json 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "plugins": ["jest", "@typescript-eslint"],
  3. "extends": ["plugin:github/recommended"],
  4. "parser": "@typescript-eslint/parser",
  5. "parserOptions": {
  6. "ecmaVersion": 9,
  7. "sourceType": "module",
  8. "project": "./tsconfig.json"
  9. },
  10. "rules": {
  11. "i18n-text/no-en": "off",
  12. "eslint-comments/no-use": "off",
  13. "import/no-namespace": "off",
  14. "no-unused-vars": "off",
  15. "@typescript-eslint/no-unused-vars": "error",
  16. "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
  17. "@typescript-eslint/no-require-imports": "error",
  18. "@typescript-eslint/array-type": "error",
  19. "@typescript-eslint/await-thenable": "error",
  20. "@typescript-eslint/ban-ts-comment": "error",
  21. "camelcase": "off",
  22. "@typescript-eslint/consistent-type-assertions": "error",
  23. "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
  24. "@typescript-eslint/func-call-spacing": ["error", "never"],
  25. "@typescript-eslint/no-array-constructor": "error",
  26. "@typescript-eslint/no-empty-interface": "error",
  27. "@typescript-eslint/no-explicit-any": "error",
  28. "@typescript-eslint/no-extraneous-class": "error",
  29. "@typescript-eslint/no-for-in-array": "error",
  30. "@typescript-eslint/no-inferrable-types": "error",
  31. "@typescript-eslint/no-misused-new": "error",
  32. "@typescript-eslint/no-namespace": "error",
  33. "@typescript-eslint/no-non-null-assertion": "warn",
  34. "@typescript-eslint/no-unnecessary-qualifier": "error",
  35. "@typescript-eslint/no-unnecessary-type-assertion": "error",
  36. "@typescript-eslint/no-useless-constructor": "error",
  37. "@typescript-eslint/no-var-requires": "error",
  38. "@typescript-eslint/prefer-for-of": "warn",
  39. "@typescript-eslint/prefer-function-type": "warn",
  40. "@typescript-eslint/prefer-includes": "error",
  41. "@typescript-eslint/prefer-string-starts-ends-with": "error",
  42. "@typescript-eslint/promise-function-async": "error",
  43. "@typescript-eslint/require-array-sort-compare": "error",
  44. "@typescript-eslint/restrict-plus-operands": "error",
  45. "semi": "off",
  46. "@typescript-eslint/semi": ["error", "never"],
  47. "@typescript-eslint/type-annotation-spacing": "error",
  48. "@typescript-eslint/unbound-method": "error"
  49. },
  50. "env": {
  51. "node": true,
  52. "es6": true,
  53. "jest/globals": true
  54. }
  55. }