.eslintrc 4.3 KB

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