.eslintrc 4.3 KB

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