You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

196 lines
3.2 KiB

  1. {
  2. "env": {
  3. "es6": true,
  4. "browser": true
  5. },
  6. "extends": [
  7. "eslint:recommended",
  8. "plugin:import/errors",
  9. "plugin:import/warnings"
  10. ],
  11. "parser": "@babel/eslint-parser",
  12. "parserOptions": {
  13. "sourceType": "module",
  14. "requireConfigFile": false
  15. },
  16. "plugins": [
  17. "import",
  18. "react-hooks"
  19. ],
  20. "rules": {
  21. "indent": [
  22. "error",
  23. "tab"
  24. ],
  25. "linebreak-style": [
  26. "error",
  27. "unix"
  28. ],
  29. "quotes": [
  30. "error",
  31. "double",
  32. {
  33. "avoidEscape": true
  34. }
  35. ],
  36. "semi": [
  37. "error",
  38. "never"
  39. ],
  40. "comma-dangle": [
  41. "error",
  42. "only-multiline"
  43. ],
  44. "comma-spacing": [
  45. "error",
  46. {
  47. "after": true
  48. }
  49. ],
  50. "eol-last": [
  51. "error",
  52. "always"
  53. ],
  54. "no-trailing-spaces": [
  55. "error"
  56. ],
  57. "camelcase": [
  58. "error",
  59. {
  60. "properties": "always"
  61. }
  62. ],
  63. "import/no-unresolved": "off",
  64. "import/named": "error",
  65. "import/namespace": "error",
  66. "import/default": "error",
  67. "import/export": "error",
  68. "import/order": [
  69. "error",
  70. {
  71. "newlines-between": "always",
  72. "pathGroups": [
  73. {
  74. "pattern": "{.,..,../..,../../..,../../../..}/lib/**",
  75. "group": "external"
  76. }
  77. ],
  78. "groups": [
  79. "builtin",
  80. "external",
  81. [
  82. "internal",
  83. "sibling",
  84. "parent"
  85. ],
  86. "index"
  87. ]
  88. }
  89. ],
  90. "max-len": [
  91. "error",
  92. {
  93. "code": 100
  94. }
  95. ],
  96. "prefer-const": [
  97. "error",
  98. {
  99. "destructuring": "all",
  100. "ignoreReadBeforeAssign": false
  101. }
  102. ],
  103. "arrow-spacing": [
  104. "error",
  105. {
  106. "before": true,
  107. "after": true
  108. }
  109. ],
  110. "space-before-blocks": [
  111. "error",
  112. "always"
  113. ],
  114. "object-curly-spacing": [
  115. "error",
  116. "always"
  117. ],
  118. "array-bracket-spacing": [
  119. "error",
  120. "never"
  121. ],
  122. "space-in-parens": [
  123. "error",
  124. "never"
  125. ],
  126. "keyword-spacing": [
  127. "error",
  128. {
  129. "before": true,
  130. "after": true
  131. }
  132. ],
  133. "key-spacing": [
  134. "error",
  135. {
  136. "afterColon": true
  137. }
  138. ],
  139. "template-curly-spacing": [
  140. "error",
  141. "never"
  142. ],
  143. "no-empty": [
  144. "error",
  145. {
  146. "allowEmptyCatch": true
  147. }
  148. ],
  149. "arrow-body-style": [
  150. "error",
  151. "as-needed"
  152. ],
  153. "no-multiple-empty-lines": [
  154. "error",
  155. {
  156. "max": 1,
  157. "maxBOF": 0,
  158. "maxEOF": 0
  159. }
  160. ],
  161. "no-prototype-builtins": "off",
  162. "dot-notation": [
  163. "error",
  164. {
  165. "allowKeywords": true
  166. }
  167. ],
  168. "quote-props": [
  169. "error",
  170. "as-needed"
  171. ],
  172. "no-multi-spaces": [
  173. "error"
  174. ],
  175. "space-infix-ops": [
  176. "error"
  177. ],
  178. "object-curly-newline": [
  179. "error",
  180. {
  181. "multiline": false,
  182. "consistent": true
  183. }
  184. ],
  185. "no-mixed-operators": [
  186. "error"
  187. ],
  188. "no-extra-parens": [
  189. "error",
  190. "all",
  191. {
  192. "nestedBinaryExpressions": false
  193. }
  194. ]
  195. }
  196. }