.eslintrc 5.9 KB

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