.eslintrc 4.0 KB

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