.eslintrc 5.3 KB

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