.eslintrc.json 2.9 KB

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