.eslintrc 5.3 KB

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