.eslintrc 4.2 KB

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