.eslintrc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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-label: 2
  67. no-empty-pattern: 2
  68. no-eq-null: 2
  69. no-eval: 2
  70. no-extend-native: 2
  71. no-extra-bind: 2
  72. no-fallthrough: 2
  73. no-floating-decimal: 0
  74. no-implicit-coercion: 0
  75. no-implied-eval: 2
  76. no-invalid-this: 0
  77. no-iterator: 2
  78. no-labels: 0
  79. no-lone-blocks: 2
  80. no-loop-func: 2
  81. no-magic-number: 0
  82. no-multi-spaces: 0
  83. no-multi-str: 0
  84. no-native-reassign: 2
  85. no-new-func: 2
  86. no-new-wrappers: 2
  87. no-new: 2
  88. no-octal-escape: 2
  89. no-octal: 2
  90. no-proto: 2
  91. no-redeclare: 2
  92. no-return-assign: 2
  93. no-script-url: 2
  94. no-self-compare: 2
  95. no-sequences: 0
  96. no-throw-literal: 0
  97. no-unused-expressions: 2
  98. no-useless-call: 2
  99. no-useless-concat: 2
  100. no-void: 2
  101. no-warning-comments: 0
  102. no-with: 2
  103. radix: 2
  104. vars-on-top: 0
  105. wrap-iife: 0
  106. yoda: 0
  107. # Strict
  108. strict: 0
  109. # Variables
  110. init-declarations: 0
  111. no-catch-shadow: 2
  112. no-delete-var: 2
  113. no-label-var: 2
  114. no-shadow-restricted-names: 2
  115. no-shadow: 0
  116. no-undef-init: 2
  117. no-undef: 0
  118. no-undefined: 0
  119. no-unused-vars: 0
  120. no-use-before-define: 0
  121. # Node.js and CommonJS
  122. callback-return: 2
  123. global-require: 2
  124. handle-callback-err: 2
  125. no-mixed-requires: 0
  126. no-new-require: 0
  127. no-path-concat: 2
  128. no-process-exit: 2
  129. no-restricted-modules: 0
  130. no-sync: 0
  131. # Stylistic Issues
  132. array-bracket-spacing: 0
  133. block-spacing: 0
  134. brace-style: 0
  135. camelcase: 0
  136. comma-spacing: 0
  137. comma-style: 0
  138. computed-property-spacing: 0
  139. consistent-this: 0
  140. eol-last: 0
  141. func-names: 0
  142. func-style: 0
  143. id-length: 0
  144. id-match: 0
  145. indent: 0
  146. jsx-quotes: 0
  147. key-spacing: 0
  148. linebreak-style: 0
  149. lines-around-comment: 0
  150. max-depth: 0
  151. max-len: 0
  152. max-nested-callbacks: 0
  153. max-params: 0
  154. max-statements:
  155. - error
  156. - 60
  157. new-cap: 0
  158. new-parens: 0
  159. newline-after-var: 0
  160. no-array-constructor: 0
  161. no-bitwise: 0
  162. no-continue: 0
  163. no-inline-comments: 0
  164. no-lonely-if: 0
  165. no-mixed-spaces-and-tabs: 0
  166. no-multiple-empty-lines: 0
  167. no-negated-condition: 0
  168. no-nested-ternary: 0
  169. no-new-object: 0
  170. no-plusplus: 0
  171. no-restricted-syntax: 0
  172. no-spaced-func: 0
  173. no-ternary: 0
  174. no-trailing-spaces: 0
  175. no-underscore-dangle: 0
  176. no-unneeded-ternary: 0
  177. object-curly-spacing: 0
  178. one-var: 0
  179. operator-assignment: 0
  180. operator-linebreak: 0
  181. padded-blocks: 0
  182. quote-props: 0
  183. quotes: 0
  184. require-jsdoc: 0
  185. semi-spacing: 0
  186. semi: 0
  187. sort-vars: 0
  188. space-after-keywords: 0
  189. space-before-blocks: 0
  190. space-before-function-paren: 0
  191. space-before-keywords: 0
  192. space-in-parens: 0
  193. space-infix-ops: 0
  194. space-return-throw-case: 0
  195. space-unary-ops: 0
  196. spaced-comment: 0
  197. wrap-regex: 0
  198. # ECMAScript 6
  199. arrow-body-style: 0
  200. arrow-parens: 0
  201. arrow-spacing: 0
  202. constructor-super: 0
  203. generator-star-spacing: 0
  204. no-arrow-condition: 0
  205. no-class-assign: 0
  206. no-const-assign: 0
  207. no-dupe-class-members: 0
  208. no-this-before-super: 0
  209. no-var: 0
  210. object-shorthand: 0
  211. prefer-arrow-callback: 0
  212. prefer-const: 0
  213. prefer-reflect: 0
  214. prefer-spread: 0
  215. prefer-template: 0
  216. require-yield: 0