.eslintrc 4.2 KB

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