You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

388 lines
12KB

  1. root: true
  2. reportUnusedDisableDirectives: true
  3. ignorePatterns:
  4. - /web_src/js/vendor
  5. parserOptions:
  6. sourceType: module
  7. ecmaVersion: 2020
  8. plugins:
  9. - eslint-plugin-unicorn
  10. - eslint-plugin-import
  11. env:
  12. browser: true
  13. es6: true
  14. jquery: true
  15. node: true
  16. globals:
  17. __webpack_public_path__: true
  18. CodeMirror: false
  19. Dropzone: false
  20. SimpleMDE: false
  21. u2fApi: false
  22. Tribute: false
  23. overrides:
  24. - files: ["web_src/**/*worker.js"]
  25. env:
  26. worker: true
  27. rules:
  28. no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
  29. - files: ["build/generate-images.js"]
  30. rules:
  31. import/no-unresolved: [0]
  32. import/no-extraneous-dependencies: [0]
  33. rules:
  34. accessor-pairs: [2]
  35. array-bracket-newline: [0]
  36. array-bracket-spacing: [2, never]
  37. array-callback-return: [0]
  38. array-element-newline: [0]
  39. arrow-body-style: [0]
  40. arrow-parens: [2, always]
  41. arrow-spacing: [2, {before: true, after: true}]
  42. block-scoped-var: [2]
  43. brace-style: [2, 1tbs, {allowSingleLine: true}]
  44. camelcase: [0]
  45. capitalized-comments: [0]
  46. class-methods-use-this: [0]
  47. comma-dangle: [2, only-multiline]
  48. comma-spacing: [2, {before: false, after: true}]
  49. comma-style: [2, last]
  50. complexity: [0]
  51. computed-property-spacing: [2, never]
  52. consistent-return: [0]
  53. consistent-this: [0]
  54. constructor-super: [2]
  55. curly: [0]
  56. default-case-last: [2]
  57. default-case: [0]
  58. default-param-last: [0]
  59. dot-location: [2, property]
  60. dot-notation: [0]
  61. eol-last: [2]
  62. eqeqeq: [2]
  63. for-direction: [2]
  64. func-call-spacing: [2, never]
  65. func-name-matching: [2]
  66. func-names: [0]
  67. func-style: [0]
  68. function-call-argument-newline: [0]
  69. function-paren-newline: [0]
  70. generator-star-spacing: [0]
  71. getter-return: [2]
  72. grouped-accessor-pairs: [2]
  73. guard-for-in: [0]
  74. id-blacklist: [0]
  75. id-length: [0]
  76. id-match: [0]
  77. implicit-arrow-linebreak: [0]
  78. import/default: [0]
  79. import/dynamic-import-chunkname: [0]
  80. import/export: [2]
  81. import/exports-last: [0]
  82. import/extensions: [2, always, {ignorePackages: true}]
  83. import/first: [2]
  84. import/group-exports: [0]
  85. import/max-dependencies: [0]
  86. import/named: [2]
  87. import/namespace: [0]
  88. import/newline-after-import: [0]
  89. import/no-absolute-path: [0]
  90. import/no-amd: [0]
  91. import/no-anonymous-default-export: [0]
  92. import/no-commonjs: [0]
  93. import/no-cycle: [0]
  94. import/no-default-export: [0]
  95. import/no-deprecated: [0]
  96. import/no-dynamic-require: [0]
  97. import/no-extraneous-dependencies: [2]
  98. import/no-internal-modules: [0]
  99. import/no-mutable-exports: [2]
  100. import/no-named-as-default-member: [0]
  101. import/no-named-as-default: [2]
  102. import/no-named-default: [0]
  103. import/no-named-export: [0]
  104. import/no-namespace: [0]
  105. import/no-nodejs-modules: [0]
  106. import/no-relative-parent-imports: [0]
  107. import/no-restricted-paths: [0]
  108. import/no-self-import: [2]
  109. import/no-unassigned-import: [0]
  110. import/no-unresolved: [2, {commonjs: true}]
  111. import/no-unused-modules: [0]
  112. import/no-useless-path-segments: [2, {commonjs: true}]
  113. import/no-webpack-loader-syntax: [2]
  114. import/order: [0]
  115. import/prefer-default-export: [0]
  116. import/unambiguous: [0]
  117. indent: [2, 2, {SwitchCase: 1}]
  118. init-declarations: [0]
  119. key-spacing: [2]
  120. keyword-spacing: [2]
  121. line-comment-position: [0]
  122. linebreak-style: [2, unix]
  123. lines-around-comment: [0]
  124. lines-between-class-members: [0]
  125. max-classes-per-file: [0]
  126. max-depth: [0]
  127. max-len: [0]
  128. max-lines-per-function: [0]
  129. max-lines: [0]
  130. max-nested-callbacks: [0]
  131. max-params: [0]
  132. max-statements-per-line: [0]
  133. max-statements: [0]
  134. multiline-comment-style: [2, separate-lines]
  135. multiline-ternary: [0]
  136. new-cap: [0]
  137. new-parens: [2]
  138. newline-per-chained-call: [0]
  139. no-alert: [0]
  140. no-array-constructor: [2]
  141. no-async-promise-executor: [2]
  142. no-await-in-loop: [0]
  143. no-bitwise: [0]
  144. no-buffer-constructor: [0]
  145. no-caller: [2]
  146. no-case-declarations: [2]
  147. no-class-assign: [2]
  148. no-compare-neg-zero: [2]
  149. no-cond-assign: [2, except-parens]
  150. no-confusing-arrow: [0]
  151. no-console: [1, {allow: [info, warn, error]}]
  152. no-const-assign: [2]
  153. no-constant-condition: [0]
  154. no-constructor-return: [2]
  155. no-continue: [0]
  156. no-control-regex: [0]
  157. no-debugger: [1]
  158. no-delete-var: [2]
  159. no-div-regex: [0]
  160. no-dupe-args: [2]
  161. no-dupe-class-members: [2]
  162. no-dupe-else-if: [2]
  163. no-dupe-keys: [2]
  164. no-duplicate-case: [2]
  165. no-duplicate-imports: [2]
  166. no-else-return: [2]
  167. no-empty-character-class: [2]
  168. no-empty-function: [0]
  169. no-empty-pattern: [2]
  170. no-empty: [2, {allowEmptyCatch: true}]
  171. no-eq-null: [2]
  172. no-eval: [2]
  173. no-ex-assign: [2]
  174. no-extend-native: [2]
  175. no-extra-bind: [2]
  176. no-extra-boolean-cast: [2]
  177. no-extra-label: [0]
  178. no-extra-parens: [0]
  179. no-extra-semi: [2]
  180. no-fallthrough: [2]
  181. no-floating-decimal: [0]
  182. no-func-assign: [2]
  183. no-global-assign: [2]
  184. no-implicit-coercion: [0]
  185. no-implicit-globals: [0]
  186. no-implied-eval: [2]
  187. no-import-assign: [2]
  188. no-inline-comments: [0]
  189. no-inner-declarations: [2]
  190. no-invalid-regexp: [2]
  191. no-invalid-this: [0]
  192. no-irregular-whitespace: [2]
  193. no-iterator: [2]
  194. no-label-var: [2]
  195. no-labels: [2]
  196. no-lone-blocks: [2]
  197. no-lonely-if: [0]
  198. no-loop-func: [0]
  199. no-loss-of-precision: [2]
  200. no-magic-numbers: [0]
  201. no-misleading-character-class: [2]
  202. no-mixed-operators: [0]
  203. no-mixed-spaces-and-tabs: [2]
  204. no-multi-assign: [0]
  205. no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true, VariableDeclarator: true}}]
  206. no-multi-str: [2]
  207. no-negated-condition: [0]
  208. no-nested-ternary: [0]
  209. no-new-func: [2]
  210. no-new-object: [2]
  211. no-new-symbol: [2]
  212. no-new-wrappers: [2]
  213. no-new: [0]
  214. no-obj-calls: [2]
  215. no-octal-escape: [2]
  216. no-octal: [2]
  217. no-param-reassign: [0]
  218. no-plusplus: [0]
  219. no-promise-executor-return: [0]
  220. no-proto: [2]
  221. no-prototype-builtins: [2]
  222. no-redeclare: [2]
  223. no-regex-spaces: [2]
  224. no-restricted-exports: [0]
  225. no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
  226. no-restricted-imports: [0]
  227. no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
  228. no-return-assign: [0]
  229. no-return-await: [0]
  230. no-script-url: [2]
  231. no-self-assign: [2, {props: true}]
  232. no-self-compare: [2]
  233. no-sequences: [2]
  234. no-setter-return: [2]
  235. no-shadow-restricted-names: [2]
  236. no-shadow: [0]
  237. no-sparse-arrays: [2]
  238. no-tabs: [2]
  239. no-template-curly-in-string: [2]
  240. no-ternary: [0]
  241. no-this-before-super: [2]
  242. no-throw-literal: [2]
  243. no-trailing-spaces: [2]
  244. no-undef-init: [2]
  245. no-undef: [2, {typeof: true}]
  246. no-undefined: [0]
  247. no-underscore-dangle: [0]
  248. no-unexpected-multiline: [2]
  249. no-unmodified-loop-condition: [2]
  250. no-unneeded-ternary: [0]
  251. no-unreachable-loop: [2]
  252. no-unreachable: [2]
  253. no-unsafe-finally: [2]
  254. no-unsafe-negation: [2]
  255. no-unused-expressions: [2]
  256. no-unused-labels: [2]
  257. no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, ignoreRestSiblings: false}]
  258. no-use-before-define: [2, nofunc]
  259. no-useless-backreference: [0]
  260. no-useless-call: [2]
  261. no-useless-catch: [2]
  262. no-useless-computed-key: [2]
  263. no-useless-concat: [2]
  264. no-useless-constructor: [2]
  265. no-useless-escape: [2]
  266. no-useless-rename: [2]
  267. no-useless-return: [2]
  268. no-var: [2]
  269. no-void: [2]
  270. no-warning-comments: [0]
  271. no-whitespace-before-property: [2]
  272. no-with: [2]
  273. nonblock-statement-body-position: [2]
  274. object-curly-newline: [0]
  275. object-curly-spacing: [2, never]
  276. object-shorthand: [2, always]
  277. one-var-declaration-per-line: [0]
  278. one-var: [0]
  279. operator-assignment: [2, always]
  280. operator-linebreak: [2, after]
  281. padded-blocks: [2, never]
  282. padding-line-between-statements: [0]
  283. prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
  284. prefer-const: [2, {destructuring: all}]
  285. prefer-destructuring: [0]
  286. prefer-exponentiation-operator: [2]
  287. prefer-named-capture-group: [0]
  288. prefer-numeric-literals: [2]
  289. prefer-object-spread: [0]
  290. prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
  291. prefer-regex-literals: [2]
  292. prefer-rest-params: [2]
  293. prefer-spread: [2]
  294. prefer-template: [2]
  295. quote-props: [0]
  296. quotes: [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
  297. radix: [2, as-needed]
  298. require-atomic-updates: [0]
  299. require-await: [0]
  300. require-unicode-regexp: [0]
  301. require-yield: [2]
  302. rest-spread-spacing: [2, never]
  303. semi-spacing: [2, {before: false, after: true}]
  304. semi-style: [2, last]
  305. semi: [2, always, {omitLastInOneLineBlock: true}]
  306. sort-imports: [0]
  307. sort-keys: [0]
  308. sort-vars: [0]
  309. space-before-blocks: [2, always]
  310. space-in-parens: [2, never]
  311. space-infix-ops: [2]
  312. space-unary-ops: [2]
  313. spaced-comment: [2, always]
  314. strict: [0]
  315. switch-colon-spacing: [2]
  316. symbol-description: [2]
  317. template-curly-spacing: [2, never]
  318. template-tag-spacing: [2, never]
  319. unicode-bom: [2, never]
  320. unicorn/better-regex: [0]
  321. unicorn/catch-error-name: [0]
  322. unicorn/consistent-function-scoping: [2]
  323. unicorn/custom-error-definition: [0]
  324. unicorn/error-message: [0]
  325. unicorn/escape-case: [0]
  326. unicorn/expiring-todo-comments: [0]
  327. unicorn/explicit-length-check: [0]
  328. unicorn/filename-case: [0]
  329. unicorn/import-index: [0]
  330. unicorn/new-for-builtins: [2]
  331. unicorn/no-abusive-eslint-disable: [0]
  332. unicorn/no-array-instanceof: [0]
  333. unicorn/no-console-spaces: [0]
  334. unicorn/no-fn-reference-in-iterator: [0]
  335. unicorn/no-for-loop: [0]
  336. unicorn/no-hex-escape: [0]
  337. unicorn/no-keyword-prefix: [0]
  338. unicorn/no-nested-ternary: [0]
  339. unicorn/no-new-buffer: [0]
  340. unicorn/no-null: [0]
  341. unicorn/no-object-as-default-parameter: [2]
  342. unicorn/no-process-exit: [0]
  343. unicorn/no-reduce: [2]
  344. unicorn/no-unreadable-array-destructuring: [0]
  345. unicorn/no-unsafe-regex: [0]
  346. unicorn/no-unused-properties: [2]
  347. unicorn/no-useless-undefined: [0]
  348. unicorn/no-zero-fractions: [2]
  349. unicorn/number-literal-case: [0]
  350. unicorn/prefer-add-event-listener: [2]
  351. unicorn/prefer-array-find: [2]
  352. unicorn/prefer-dataset: [2]
  353. unicorn/prefer-event-key: [2]
  354. unicorn/prefer-includes: [2]
  355. unicorn/prefer-modern-dom-apis: [0]
  356. unicorn/prefer-negative-index: [2]
  357. unicorn/prefer-node-append: [0]
  358. unicorn/prefer-node-remove: [0]
  359. unicorn/prefer-number-properties: [0]
  360. unicorn/prefer-optional-catch-binding: [2]
  361. unicorn/prefer-query-selector: [0]
  362. unicorn/prefer-reflect-apply: [0]
  363. unicorn/prefer-replace-all: [0]
  364. unicorn/prefer-set-has: [0]
  365. unicorn/prefer-spread: [0]
  366. unicorn/prefer-starts-ends-with: [2]
  367. unicorn/prefer-string-slice: [0]
  368. unicorn/prefer-text-content: [2]
  369. unicorn/prefer-trim-start-end: [2]
  370. unicorn/prefer-type-error: [0]
  371. unicorn/prevent-abbreviations: [0]
  372. unicorn/string-content: [0]
  373. unicorn/throw-new-error: [2]
  374. use-isnan: [2]
  375. valid-typeof: [2, {requireStringLiterals: true}]
  376. vars-on-top: [0]
  377. wrap-iife: [2, inside]
  378. wrap-regex: [0]
  379. yield-star-spacing: [2, after]
  380. yoda: [2, never]