.eslintrc 4.3 KB

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