.eslintrc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {
  2. "extends": [
  3. "eslint:recommended",
  4. "plugin:@typescript-eslint/recommended"
  5. ],
  6. "plugins": [
  7. "@typescript-eslint"
  8. ],
  9. "parser": "@typescript-eslint/parser",
  10. "parserOptions": {
  11. "ecmaVersion": 2018,
  12. "sourceType": "module"
  13. },
  14. "env": {
  15. "browser": true,
  16. "node": true
  17. },
  18. "ignorePatterns": [
  19. "*.esm.js"
  20. ],
  21. "rules": {
  22. "semi": [
  23. "error",
  24. "always",
  25. {
  26. "omitLastInOneLineBlock": true
  27. }
  28. ],
  29. "space-in-parens": [
  30. "error",
  31. "always"
  32. ],
  33. "array-bracket-spacing": [
  34. "error",
  35. "always"
  36. ],
  37. "object-curly-spacing": [
  38. "error",
  39. "always"
  40. ],
  41. "computed-property-spacing": [
  42. "error",
  43. "always"
  44. ],
  45. "camelcase": "error",
  46. "comma-dangle": [
  47. "error",
  48. {
  49. "arrays": "always-multiline",
  50. "objects": "always-multiline",
  51. "imports": "always-multiline",
  52. "exports": "always-multiline",
  53. "functions": "never"
  54. }
  55. ],
  56. "comma-spacing": [
  57. "error",
  58. {
  59. "before": false,
  60. "after": true
  61. }
  62. ],
  63. "eqeqeq": "error",
  64. "indent": [
  65. "error",
  66. 2,
  67. {
  68. "SwitchCase": 1,
  69. "VariableDeclarator": "first"
  70. }
  71. ],
  72. "no-console": [
  73. "error",
  74. {
  75. "allow": [
  76. "error"
  77. ]
  78. }
  79. ],
  80. "no-empty-function": [
  81. "error",
  82. {
  83. "allow": [
  84. "methods"
  85. ]
  86. }
  87. ],
  88. "@typescript-eslint/no-empty-function": [
  89. "error",
  90. {
  91. "allow": [
  92. "methods"
  93. ]
  94. }
  95. ],
  96. "@typescript-eslint/no-unused-vars": "error",
  97. "@typescript-eslint/no-explicit-any": "off",
  98. "@typescript-eslint/no-empty-interface": "off",
  99. "@typescript-eslint/no-var-requires": "off",
  100. "@typescript-eslint/explicit-module-boundary-types": [
  101. "error",
  102. {
  103. "allowArgumentsExplicitlyTypedAsAny": true
  104. }
  105. ],
  106. "@typescript-eslint/ban-types": [
  107. "error",
  108. {
  109. "types": {
  110. "object": false
  111. }
  112. }
  113. ]
  114. }
  115. }