.eslintrc.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. ---
  2. extends:
  3. - 'eslint:recommended'
  4. parser: 'babel-eslint'
  5. parserOptions:
  6. ecmaVersion: 6
  7. sourceType: module
  8. ecmaFeatures:
  9. jsx: true
  10. experimentalObjectRestSpread: true
  11. env:
  12. browser: true
  13. node: true
  14. es6: true
  15. plugins:
  16. - react
  17. rules:
  18. # best practices section
  19. array-callback-return: error
  20. block-scoped-var: error
  21. consistent-return: error
  22. curly: [ error, 'multi-line' ]
  23. default-case: error
  24. dot-location:
  25. - error
  26. - property
  27. dot-notation: error
  28. eqeqeq: error
  29. no-alert: error
  30. no-div-regex: error
  31. no-else-return: error
  32. no-empty-function: error
  33. no-eq-null: error
  34. no-eval: error
  35. no-extend-native: error
  36. no-extra-bind: error
  37. no-extra-label: error
  38. no-floating-decimal: error
  39. no-global-assign: error
  40. no-implicit-coercion: error
  41. no-implicit-globals: error
  42. no-implied-eval: error
  43. no-iterator: error
  44. no-labels: error
  45. no-lone-blocks: error
  46. no-loop-func: error
  47. # no-multi-spaces: error
  48. no-multi-str: error
  49. no-new-func: error
  50. no-new-wrappers: error
  51. no-new: error
  52. no-octal-escape: error
  53. no-param-reassign: error
  54. no-proto: error
  55. no-return-assign: error
  56. no-script-url: error
  57. no-self-compare: error
  58. no-sequences: error
  59. no-throw-literal: error
  60. no-unmodified-loop-condition: error
  61. no-unused-expressions: error
  62. no-useless-call: error
  63. no-useless-concat: error
  64. no-useless-escape: error
  65. no-void: error
  66. no-with: error
  67. vars-on-top: error
  68. wrap-iife: error
  69. yoda: error
  70. # Variables section
  71. no-label-var: error
  72. no-shadow-restricted-names: error
  73. no-shadow: error
  74. no-undef-init: error
  75. # no-undefined: error
  76. no-use-before-define: error
  77. # Stylistic Issues section
  78. # array-bracket-spacing:
  79. # - error
  80. # - always
  81. block-spacing: error
  82. brace-style: error
  83. camelcase:
  84. - error
  85. - properties: never
  86. comma-dangle: error
  87. comma-spacing: error
  88. comma-style: error
  89. computed-property-spacing: error
  90. consistent-this: error
  91. eol-last: error
  92. func-call-spacing: error
  93. func-names: warn
  94. func-style:
  95. - warn
  96. - expression
  97. indent:
  98. - error
  99. - 2
  100. - SwitchCase: 1
  101. key-spacing: error
  102. keyword-spacing: error
  103. linebreak-style: error
  104. lines-around-comment: warn
  105. max-depth: warn
  106. max-lines: ["warn", {
  107. "max": 500,
  108. "skipComments": true
  109. }]
  110. max-len:
  111. - warn
  112. - 145
  113. max-nested-callbacks: warn
  114. # max-params: warn
  115. max-params: ["warn", 5]
  116. max-statements-per-line: warn
  117. max-statements:
  118. - warn
  119. - 50
  120. new-cap: warn
  121. new-parens: error
  122. # newline-after-var: warn
  123. no-array-constructor: error
  124. no-bitwise: error
  125. no-lonely-if: warn
  126. no-multiple-empty-lines: warn
  127. no-nested-ternary: error
  128. no-new-object: error
  129. no-plusplus: error
  130. no-tabs: error
  131. no-trailing-spaces: error
  132. # no-underscore-dangle: warn
  133. no-unneeded-ternary: warn
  134. no-whitespace-before-property: error
  135. object-curly-newline: error
  136. object-curly-spacing:
  137. - error
  138. - always
  139. one-var:
  140. - error
  141. - never
  142. operator-assignment: error
  143. operator-linebreak: error
  144. quote-props:
  145. - error
  146. - as-needed
  147. quotes:
  148. - error
  149. - single
  150. - avoid-escape
  151. semi-spacing: error
  152. semi: error
  153. space-before-blocks: error
  154. space-before-function-paren: error
  155. space-in-parens: error
  156. space-infix-ops: error
  157. space-unary-ops: error
  158. spaced-comment: warn
  159. unicode-bom: error
  160. wrap-regex: error
  161. # ECMAScript 6 / ES2015 Section
  162. arrow-body-style: error
  163. # arrow-parens: error
  164. arrow-spacing: error
  165. generator-star-spacing: warn
  166. # no-confusing-arrow: warn
  167. no-duplicate-imports: error
  168. no-useless-computed-key: warn
  169. no-useless-constructor: warn
  170. no-useless-rename: error
  171. no-var: error
  172. object-shorthand: error
  173. prefer-arrow-callback: warn
  174. # prefer-const: error
  175. # prefer-reflect: warn
  176. prefer-rest-params: warn
  177. prefer-spread: warn
  178. prefer-template: error
  179. rest-spread-spacing: error
  180. template-curly-spacing: error
  181. yield-star-spacing: error
  182. # JSX RULES
  183. # jsx-quotes:
  184. # - error
  185. # - prefer-single
  186. react/jsx-boolean-value: error
  187. # react/jsx-curly-spacing:
  188. # - error
  189. # - never
  190. react/jsx-equals-spacing:
  191. - error
  192. - never
  193. react/jsx-indent:
  194. - error
  195. - 2
  196. react/jsx-indent-props:
  197. - error
  198. - 2
  199. react/jsx-no-duplicate-props: error
  200. react/jsx-no-undef: error
  201. react/jsx-tag-spacing: error
  202. react/jsx-uses-react: error
  203. react/jsx-uses-vars: error
  204. # react/self-closing-comp: error