.eslintrc.json 2.8 KB

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