.eslintrc.json 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. },
  44. "overrides": [
  45. {
  46. "files": ["**/*.ts", "**/*.tsx"],
  47. "parser": "@typescript-eslint/parser",
  48. "parserOptions": {
  49. "project": ["tsconfig.json", "tsconfig.commonjs.json"],
  50. "sourceType": "module"
  51. },
  52. "plugins": [
  53. "@typescript-eslint"
  54. ],
  55. "rules": {
  56. "@typescript-eslint/ban-types": "off",
  57. "@typescript-eslint/class-name-casing": "off",
  58. "@typescript-eslint/indent": [
  59. "error",
  60. 4
  61. ],
  62. "@typescript-eslint/member-delimiter-style": [
  63. "off",
  64. {
  65. "multiline": {
  66. "delimiter": "none",
  67. "requireLast": true
  68. },
  69. "singleline": {
  70. "delimiter": "semi",
  71. "requireLast": false
  72. }
  73. }
  74. ],
  75. "@typescript-eslint/prefer-namespace-keyword": "warn",
  76. "@typescript-eslint/quotes": [
  77. "error",
  78. "single",
  79. {
  80. "avoidEscape": true,
  81. "allowTemplateLiterals": true
  82. }
  83. ],
  84. "@typescript-eslint/semi": [
  85. "off",
  86. null
  87. ],
  88. "@typescript-eslint/type-annotation-spacing": "error",
  89. "@typescript-eslint/brace-style": [
  90. "error",
  91. "1tbs", { "allowSingleLine": true }
  92. ],
  93. "@typescript-eslint/comma-spacing": "error"
  94. }
  95. }
  96. ]
  97. }