.eslintrc.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "env": {
  3. "es6": true,
  4. "node": true
  5. },
  6. "extends":[
  7. "eslint:recommended",
  8. "plugin:node/recommended"
  9. ],
  10. "parser": "babel-eslint",
  11. "parserOptions": {
  12. "sourceType": "module",
  13. "ecmaVersion": 2020
  14. },
  15. "rules": {
  16. "no-await-in-loop": ["error"],
  17. "no-shadow": ["error"],
  18. "no-redeclare": ["warn"],
  19. "arrow-spacing": ["warn"],
  20. "init-declarations": ["error", "always"],
  21. "no-setter-return": ["warn"],
  22. "no-duplicate-imports": [
  23. "warn"
  24. ],
  25. "no-const-assign": [
  26. "warn"
  27. ],
  28. "no-import-assign": [
  29. "error"
  30. ],
  31. "space-unary-ops": [
  32. "error",
  33. {
  34. "words": true,
  35. "nonwords": false
  36. }],
  37. "quote-props": [
  38. "error",
  39. "always"
  40. ],
  41. "no-unneeded-ternary": [
  42. "error"
  43. ],
  44. "rest-spread-spacing": ["error", "never"],
  45. "no-param-reassign": [
  46. "warn"
  47. ],
  48. "no-self-compare": [
  49. "error"
  50. ],
  51. "prefer-object-spread": [ "warn"],
  52. "indent": [
  53. "warn",
  54. "tab",
  55. { "SwitchCase": 1 }
  56. ],
  57. "quotes": [
  58. "error",
  59. "double"
  60. ],
  61. "semi": [
  62. "error",
  63. "always"
  64. ],
  65. "no-lone-blocks": [
  66. "error"
  67. ],
  68. "no-multi-str": [
  69. "error"
  70. ],
  71. "no-path-concat": [
  72. "error"
  73. ],
  74. "no-process-exit": [
  75. "error"
  76. ],
  77. "global-require": [
  78. "warn"
  79. ],
  80. "no-lonely-if": [
  81. "error"
  82. ],
  83. "no-spaced-func": [
  84. "warn"
  85. ],
  86. "no-confusing-arrow": [
  87. "error"
  88. ],
  89. "prefer-template": [
  90. "error"
  91. ],
  92. "no-constant-condition": [
  93. "error"
  94. ],
  95. "arrow-body-style": [
  96. "warn",
  97. "as-needed"
  98. ],
  99. "no-var": [
  100. "error"
  101. ],
  102. "no-nested-ternary": [
  103. "warn"
  104. ],
  105. "no-multiple-empty-lines": [
  106. "warn"
  107. ],
  108. "no-template-curly-in-string": [
  109. "error"
  110. ],
  111. "no-empty-function": [
  112. "error"
  113. ],
  114. "no-floating-decimal": [
  115. "error"
  116. ],
  117. "no-multi-spaces": [
  118. "warn"
  119. ],
  120. "guard-for-in": [
  121. "error"
  122. ],
  123. "yoda" : [
  124. "error"
  125. ],
  126. "array-callback-return": [
  127. "error"
  128. ],
  129. "no-dupe-else-if": [
  130. "error"
  131. ],
  132. "no-magic-numbers": [
  133. "warn"
  134. ],
  135. "vars-on-top": [
  136. "warn"
  137. ],
  138. "func-call-spacing": [
  139. "warn"
  140. ],
  141. "no-eval": ["error"]
  142. }
  143. }