.eslintrc 4.0 KB

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