.eslintrc.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {
  2. "env": {
  3. "node": true
  4. },
  5. "parser": "@typescript-eslint/parser",
  6. "plugins": [
  7. "eslint-plugin-import",
  8. "eslint-plugin-jsdoc",
  9. "@typescript-eslint"
  10. ],
  11. "extends": ["prettier"],
  12. "rules": {
  13. "@typescript-eslint/consistent-type-assertions": "error",
  14. "@typescript-eslint/explicit-function-return-type": [
  15. "error",
  16. {
  17. "allowExpressions": true,
  18. "allowTypedFunctionExpressions": true,
  19. "allowHigherOrderFunctions": false,
  20. "allowDirectConstAssertionInArrowFunctions": true,
  21. "allowConciseArrowFunctionExpressionsStartingWithVoid": true
  22. }
  23. ],
  24. "@typescript-eslint/explicit-module-boundary-types": [
  25. "error",
  26. {
  27. "allowArgumentsExplicitlyTypedAsAny": true,
  28. "allowDirectConstAssertionInArrowFunctions": true,
  29. "allowHigherOrderFunctions": false,
  30. "allowTypedFunctionExpressions": false
  31. }
  32. ],
  33. "@typescript-eslint/naming-convention": [
  34. "error",
  35. {
  36. "selector": [
  37. "classProperty",
  38. "objectLiteralProperty",
  39. "typeProperty",
  40. "classMethod",
  41. "objectLiteralMethod",
  42. "typeMethod",
  43. "accessor",
  44. "enumMember"
  45. ],
  46. "format": null,
  47. "modifiers": ["requiresQuotes"]
  48. }
  49. ],
  50. "@typescript-eslint/no-empty-function": "error",
  51. "@typescript-eslint/no-explicit-any": "error",
  52. "@typescript-eslint/no-namespace": "error",
  53. "@typescript-eslint/no-parameter-properties": "error",
  54. "@typescript-eslint/no-require-imports": "off",
  55. "@typescript-eslint/no-shadow": "error",
  56. "@typescript-eslint/no-unused-expressions": "error",
  57. "@typescript-eslint/no-var-requires": "off",
  58. "@typescript-eslint/prefer-namespace-keyword": "error",
  59. "@typescript-eslint/triple-slash-reference": "error",
  60. "@typescript-eslint/typedef": [
  61. "error",
  62. {
  63. "parameter": true,
  64. "propertyDeclaration": true
  65. }
  66. ],
  67. "curly": "error",
  68. "default-case": "error",
  69. "eqeqeq": ["error", "always"],
  70. "guard-for-in": "error",
  71. "id-denylist": [
  72. "error",
  73. "any",
  74. "Number",
  75. "number",
  76. "String",
  77. "string",
  78. "Boolean",
  79. "boolean",
  80. "Undefined",
  81. "undefined"
  82. ],
  83. "id-match": "error",
  84. "import/no-default-export": "error",
  85. "jsdoc/check-alignment": "error",
  86. "jsdoc/check-indentation": "error",
  87. "jsdoc/newline-after-description": "error",
  88. "max-len": [
  89. "error",
  90. {
  91. "code": 160
  92. }
  93. ],
  94. "max-lines": ["error", 800],
  95. "no-bitwise": "error",
  96. "no-caller": "error",
  97. "no-cond-assign": "error",
  98. "no-debugger": "error",
  99. "no-empty": "error",
  100. "no-eval": "error",
  101. "no-fallthrough": "error",
  102. "no-invalid-this": "error",
  103. "no-new-wrappers": "error",
  104. "no-redeclare": "error",
  105. "no-underscore-dangle": "error",
  106. "no-unsafe-finally": "error",
  107. "no-unused-labels": "error",
  108. "no-var": "error",
  109. "one-var": ["error", "never"],
  110. "radix": "error",
  111. "use-isnan": "error"
  112. }
  113. }