.eslintrc.json 2.6 KB

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