.eslintrc.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "env": {
  3. "browser": true,
  4. "node": true
  5. },
  6. "parserOptions": {
  7. "ecmaVersion": 2018,
  8. "sourceType": "module",
  9. "ecmaFeatures": {
  10. "impliedStrict": true
  11. }
  12. },
  13. "rules": {
  14. "indent": "off",
  15. "arrow-parens": [
  16. "off",
  17. "as-needed"
  18. ],
  19. "brace-style": "off",
  20. "comma-spacing": "off",
  21. "space-infix-ops": "error",
  22. "comma-dangle": "off",
  23. "eqeqeq": [
  24. "error",
  25. "smart"
  26. ],
  27. "import/order": "off",
  28. "no-eval": "warn",
  29. "no-new-wrappers": "warn",
  30. "no-trailing-spaces": "error",
  31. "no-unsafe-finally": "warn",
  32. "no-var": "error",
  33. "spaced-comment": "error",
  34. "semi": "warn",
  35. "no-restricted-syntax": [
  36. "error",
  37. {
  38. "selector": "ExportDefaultDeclaration",
  39. "message": "Default exports are not allowed"
  40. }
  41. ],
  42. "no-throw-literal": "error",
  43. "key-spacing": "error",
  44. "object-curly-spacing": ["error", "always"]
  45. },
  46. "overrides": [
  47. {
  48. "files": ["**/*.ts", "**/*.tsx"],
  49. "parser": "@typescript-eslint/parser",
  50. "parserOptions": {
  51. "project": ["tsconfig.json", "tsconfig.commonjs.json"],
  52. "sourceType": "module"
  53. },
  54. "plugins": [
  55. "@typescript-eslint"
  56. ],
  57. "rules": {
  58. "@typescript-eslint/ban-types": "off",
  59. "@typescript-eslint/class-name-casing": "off",
  60. "@typescript-eslint/indent": [
  61. "error",
  62. 4
  63. ],
  64. "@typescript-eslint/member-delimiter-style": [
  65. "off",
  66. {
  67. "multiline": {
  68. "delimiter": "none",
  69. "requireLast": true
  70. },
  71. "singleline": {
  72. "delimiter": "semi",
  73. "requireLast": false
  74. }
  75. }
  76. ],
  77. "@typescript-eslint/prefer-namespace-keyword": "warn",
  78. "@typescript-eslint/quotes": [
  79. "error",
  80. "single",
  81. {
  82. "avoidEscape": true,
  83. "allowTemplateLiterals": true
  84. }
  85. ],
  86. "@typescript-eslint/semi": [
  87. "off",
  88. null
  89. ],
  90. "@typescript-eslint/type-annotation-spacing": "error",
  91. "@typescript-eslint/brace-style": [
  92. "error",
  93. "1tbs", { "allowSingleLine": true }
  94. ],
  95. "@typescript-eslint/comma-spacing": "error"
  96. }
  97. }
  98. ]
  99. }