.eslintrc.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {
  2. "rules": {
  3. "no-alert": "error",
  4. "no-array-constructor": "off",
  5. "no-bitwise": "off",
  6. "no-caller": "error",
  7. "no-catch-shadow": "error",
  8. "no-class-assign": "error",
  9. "no-cond-assign": "error",
  10. "no-console": "error",
  11. "no-const-assign": "error",
  12. "no-constant-condition": "error",
  13. "no-continue": "off",
  14. "no-control-regex": "error",
  15. "no-debugger": "error",
  16. "no-delete-var": "error",
  17. "no-div-regex": "off",
  18. "no-dupe-keys": "error",
  19. "no-dupe-args": "error",
  20. "no-duplicate-case": "error",
  21. "no-else-return": "error",
  22. "no-empty": "error",
  23. "no-empty-character-class": "error",
  24. "no-eq-null": "off",
  25. "no-eval": "error",
  26. "no-ex-assign": "error",
  27. "no-extend-native": "error",
  28. "no-extra-bind": "error",
  29. "no-extra-boolean-cast": "error",
  30. "no-extra-parens": "off",
  31. "no-extra-semi": "error",
  32. "no-fallthrough": "error",
  33. "no-floating-decimal": "error",
  34. "no-func-assign": "error",
  35. "no-implicit-coercion": "error",
  36. "no-implied-eval": "error",
  37. "no-inline-comments": "off",
  38. "no-inner-declarations": ["error", "functions"],
  39. "no-invalid-regexp": "error",
  40. "no-invalid-this": "error",
  41. "no-irregular-whitespace": "error",
  42. "no-iterator": "error",
  43. "no-label-var": "error",
  44. "no-labels": "error",
  45. "no-lone-blocks": "error",
  46. "no-lonely-if": "error",
  47. "no-loop-func": "error",
  48. "no-mixed-requires": ["error", false],
  49. "no-mixed-spaces-and-tabs": ["error", false],
  50. "linebreak-style": ["off", "unix"],
  51. "no-multi-spaces": "error",
  52. "no-multi-str": "off",
  53. "no-multiple-empty-lines": ["error", {"max": 2}],
  54. "no-native-reassign": "error",
  55. "no-negated-in-lhs": "error",
  56. "no-nested-ternary": "error",
  57. "no-new": "error",
  58. "no-new-func": "error",
  59. "no-new-object": "error",
  60. "no-new-require": "error",
  61. "no-new-wrappers": "error",
  62. "no-obj-calls": "error",
  63. "no-octal": "error",
  64. "no-octal-escape": "off",
  65. "no-param-reassign": "off",
  66. "no-path-concat": "off",
  67. "no-plusplus": "off",
  68. "no-process-env": "off",
  69. "no-process-exit": "off",
  70. "no-proto": "off",
  71. "no-redeclare": "error",
  72. "no-regex-spaces": "error",
  73. "no-restricted-modules": "off",
  74. "no-return-assign": "error",
  75. "no-script-url": "off",
  76. "no-self-compare": "error",
  77. "no-sequences": "error",
  78. "no-shadow": "error",
  79. "no-shadow-restricted-names": "error",
  80. "no-spaced-func": "error",
  81. "no-sparse-arrays": "error",
  82. "no-sync": "off",
  83. "no-ternary": "off",
  84. "no-trailing-spaces": "error",
  85. "no-this-before-super": "error",
  86. "no-throw-literal": "error",
  87. "no-undef": "error",
  88. "no-undef-init": "error",
  89. "no-undefined": "off",
  90. "no-unexpected-multiline": "error",
  91. "no-underscore-dangle": "off",
  92. "no-unneeded-ternary": "off",
  93. "no-unreachable": "error",
  94. "no-unused-expressions": "error",
  95. "no-unused-vars": ["error", {"vars": "all", "args": "after-used"}],
  96. "no-use-before-define": "error",
  97. "no-useless-call": "error",
  98. "no-void": "off",
  99. "no-var": "off",
  100. "no-warning-comments": ["error", { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
  101. "no-with": "error",
  102. "array-bracket-spacing": ["error", "never"],
  103. "arrow-parens": "error",
  104. "arrow-spacing": "error",
  105. "accessor-pairs": "error",
  106. "block-scoped-var": "off",
  107. "brace-style": ["error", "stroustrup"],
  108. "callback-return": ["error", ["callback", "cb", "next"]],
  109. "camelcase": ["error", {"properties": "always"}],
  110. "comma-dangle": ["error", "never"],
  111. "comma-spacing": "error",
  112. "comma-style": "error",
  113. "complexity": "off",
  114. "computed-property-spacing": ["off", "never"],
  115. "consistent-return": "off",
  116. "consistent-this": ["off", "that"],
  117. "constructor-super": "error",
  118. "curly": ["error", "all"],
  119. "default-case": "error",
  120. "dot-location": ["error", "property"],
  121. "dot-notation": ["error", { "allowKeywords": true }],
  122. "eol-last": "off",
  123. "eqeqeq": ["error", "smart"],
  124. "func-names": "off",
  125. "func-style": ["off", "declaration"],
  126. "generator-star-spacing": "off",
  127. "guard-for-in": "error",
  128. "handle-callback-err": "error",
  129. "id-length": ["error", {"min": 3, "max": 25, "exceptions":["x", "y", "i", "j", "ex", "up"]}],
  130. "indent": ["error", 2, {"SwitchCase": 1}],
  131. "init-declarations": "off",
  132. "key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
  133. "keyword-spacing": "error",
  134. "lines-around-comment": "off",
  135. "max-depth": ["error", 6],
  136. "max-len": ["error", { "code": 160 }],
  137. "max-nested-callbacks": ["error", 1],
  138. "max-params": ["error", 6],
  139. "max-statements": "off",
  140. "new-cap": "error",
  141. "new-parens": "error",
  142. "newline-after-var": "off",
  143. "object-curly-spacing": ["error", "always"],
  144. "object-shorthand": "off",
  145. "one-var": ["error", {
  146. "initialized": "never"
  147. }],
  148. "operator-assignment": ["off", "always"],
  149. "operator-linebreak": ["error", "after"],
  150. "padded-blocks": "off",
  151. "prefer-const": "off",
  152. "prefer-spread": "off",
  153. "prefer-reflect": "off",
  154. "quote-props": "off",
  155. "quotes": ["error", "single"],
  156. "radix": "off",
  157. "id-match": "off",
  158. "require-yield": "off",
  159. "semi": ["error", "always"],
  160. "semi-spacing": ["error", {"before": false, "after": true}],
  161. "sort-vars": "off",
  162. "space-before-blocks": ["error", "always"],
  163. "space-before-function-paren": ["error", "never"],
  164. "space-in-parens": ["error", "never"],
  165. "space-infix-ops": "error",
  166. "space-unary-ops": ["error", { "words": true, "nonwords": false }],
  167. "spaced-comment": "off",
  168. "strict": ["error", "global"],
  169. "use-isnan": "error",
  170. "valid-jsdoc": "off",
  171. "valid-typeof": "error",
  172. "vars-on-top": "off",
  173. "wrap-iife": "off",
  174. "wrap-regex": "off",
  175. "yoda": ["off", "never"]
  176. },
  177. "env": {
  178. "node": true,
  179. "es6": true
  180. }
  181. }