.eslintrc 4.2 KB

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