.eslintrc 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {
  2. "env": {
  3. "es6": true,
  4. "node": true
  5. },
  6. "parserOptions": {
  7. "ecmaVersion": 6,
  8. "ecmaFeatures": {
  9. "jsx": true
  10. }
  11. },
  12. "rules": {
  13. // Possible Errors
  14. "comma-dangle": [2, "never"],
  15. "computed-property-spacing": [2, "never"],
  16. "no-cond-assign": 2,
  17. "no-console": 2,
  18. "no-constant-condition": 2,
  19. "no-control-regex": 2,
  20. "no-debugger": 2,
  21. "no-dupe-keys": 2,
  22. "no-empty": 2,
  23. "no-empty-character-class": 2,
  24. "no-ex-assign": 2,
  25. "no-extra-boolean-cast": 2,
  26. "no-extra-parens": 0,
  27. "no-extra-semi": 2,
  28. "no-func-assign": 2,
  29. "no-inner-declarations": 2,
  30. "no-invalid-regexp": 2,
  31. "no-irregular-whitespace": 2,
  32. "no-negated-in-lhs": 2,
  33. "no-obj-calls": 2,
  34. "no-regex-spaces": 2,
  35. "no-reserved-keys": 0,
  36. "no-sparse-arrays": 2,
  37. "no-unreachable": 2,
  38. "use-isnan": 2,
  39. "valid-jsdoc": 0,
  40. "valid-typeof": 2,
  41. // Best Practices
  42. "block-scoped-var": 2,
  43. "complexity": 0,
  44. "consistent-return": 2,
  45. "curly": 2,
  46. "default-case": 2,
  47. "dot-notation": 2,
  48. "eqeqeq": 2,
  49. "guard-for-in": 2,
  50. "no-alert": 2,
  51. "no-caller": 2,
  52. "no-confusing-arrow": 2,
  53. "no-div-regex": 2,
  54. "no-else-return": 2,
  55. "no-eq-null": 2,
  56. "no-eval": 2,
  57. "no-extend-native": 2,
  58. "no-extra-bind": 2,
  59. "no-fallthrough": 2,
  60. "no-floating-decimal": 2,
  61. "no-implied-eval": 2,
  62. "no-iterator": 2,
  63. "no-labels": 2,
  64. "no-lone-blocks": 2,
  65. "no-loop-func": 2,
  66. "no-multi-spaces": 2,
  67. "no-multi-str": 2,
  68. "no-native-reassign": 2,
  69. "no-new": 2,
  70. "no-new-func": 2,
  71. "no-new-wrappers": 2,
  72. "no-octal": 2,
  73. "no-octal-escape": 2,
  74. "no-process-env": 2,
  75. "no-proto": 2,
  76. "no-redeclare": 2,
  77. "no-return-assign": 2,
  78. "no-script-url": 2,
  79. "no-self-compare": 2,
  80. "no-sequences": 2,
  81. "no-unused-expressions": 2,
  82. "no-void": 0,
  83. "no-warning-comments": 2,
  84. "no-with": 2,
  85. "prefer-arrow-callback": 2,
  86. "radix": 2,
  87. "vars-on-top": 0,
  88. "wrap-iife": 2,
  89. "yoda": 2,
  90. // Strict Mode
  91. "strict": [2, "global"],
  92. // Variables
  93. "prefer-const": 2,
  94. "no-catch-shadow": 2,
  95. "no-const-assign": 2,
  96. "no-delete-var": 2,
  97. "no-label-var": 2,
  98. "no-shadow": 2,
  99. "no-shadow-restricted-names": 2,
  100. "no-undef": 2,
  101. "no-undef-init": 2,
  102. "no-undefined": 2,
  103. "no-unused-vars": 2,
  104. "no-use-before-define": 2,
  105. "no-var": 2,
  106. // Stylistic Issues
  107. "indent": [2, 2, {
  108. "SwitchCase": 1
  109. }],
  110. "arrow-body-style": [2, "as-needed"],
  111. "arrow-parens": [2, "as-needed"],
  112. "arrow-spacing": 2,
  113. "brace-style": 2,
  114. "camelcase": 0,
  115. "comma-spacing": 2,
  116. "comma-style": 2,
  117. "consistent-this": 0,
  118. "eol-last": 2,
  119. "func-names": 0,
  120. "func-style": 0,
  121. "key-spacing": [2, {
  122. "beforeColon": false,
  123. "afterColon": true
  124. }],
  125. "max-nested-callbacks": 0,
  126. "new-cap": 2,
  127. "new-parens": 2,
  128. "no-array-constructor": 2,
  129. "no-inline-comments": 0,
  130. "no-lonely-if": 2,
  131. "no-mixed-spaces-and-tabs": 2,
  132. "no-nested-ternary": 2,
  133. "no-new-object": 2,
  134. "semi-spacing": [2, {
  135. "before": false,
  136. "after": true
  137. }],
  138. "no-spaced-func": 2,
  139. "no-ternary": 0,
  140. "no-trailing-spaces": 2,
  141. "no-multiple-empty-lines": 2,
  142. "no-underscore-dangle": 0,
  143. "one-var": 0,
  144. "operator-assignment": [2, "always"],
  145. "padded-blocks": [2, { "blocks": "never", "classes": "never", "switches": "never" }],
  146. "quotes": [2, "single"],
  147. "quote-props": [2, "as-needed"],
  148. "semi": [2, "always"],
  149. "sort-vars": [2, {"ignoreCase": true}],
  150. "keyword-spacing": 2,
  151. "space-before-blocks": 2,
  152. "object-curly-spacing": [2, "never"],
  153. "array-bracket-spacing": [2, "never"],
  154. "space-in-parens": 2,
  155. "space-infix-ops": 2,
  156. "space-unary-ops": 2,
  157. "spaced-comment": 2,
  158. "wrap-regex": 0,
  159. // Legacy
  160. "max-depth": 0,
  161. "max-len": [2, 120, {
  162. "ignoreStrings": true,
  163. "ignoreTemplateLiterals": true,
  164. "ignoreComments": true,
  165. }],
  166. "max-params": 0,
  167. "max-statements": 0,
  168. "no-plusplus": 0,
  169. "no-prototype-builtins": 2,
  170. "prefer-template": 2,
  171. "template-curly-spacing": [2, "never"],
  172. }
  173. }