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.

.eslintrc 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. root: true
  2. reportUnusedDisableDirectives: true
  3. ignorePatterns:
  4. - /web_src/js/vendor
  5. parserOptions:
  6. sourceType: module
  7. ecmaVersion: latest
  8. plugins:
  9. - eslint-plugin-unicorn
  10. - eslint-plugin-import
  11. - eslint-plugin-vue
  12. - eslint-plugin-html
  13. - eslint-plugin-jquery
  14. extends:
  15. - plugin:vue/recommended
  16. env:
  17. es2022: true
  18. node: true
  19. globals:
  20. __webpack_public_path__: true
  21. settings:
  22. html/html-extensions: [".tmpl"]
  23. overrides:
  24. - files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
  25. env:
  26. browser: true
  27. node: false
  28. - files: ["templates/**/*.tmpl"]
  29. rules:
  30. no-tabs: [0]
  31. indent: [2, tab, {SwitchCase: 1}]
  32. - files: ["web_src/**/*worker.js"]
  33. env:
  34. worker: true
  35. rules:
  36. 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]
  37. - files: ["build/generate-images.js"]
  38. rules:
  39. import/no-unresolved: [0]
  40. import/no-extraneous-dependencies: [0]
  41. - files: ["*.test.js"]
  42. env:
  43. jest: true
  44. - files: ["*.config.js"]
  45. rules:
  46. import/no-unused-modules: [0]
  47. rules:
  48. accessor-pairs: [2]
  49. array-bracket-newline: [0]
  50. array-bracket-spacing: [2, never]
  51. array-callback-return: [0]
  52. array-element-newline: [0]
  53. arrow-body-style: [0]
  54. arrow-parens: [2, always]
  55. arrow-spacing: [2, {before: true, after: true}]
  56. block-scoped-var: [2]
  57. brace-style: [2, 1tbs, {allowSingleLine: true}]
  58. camelcase: [0]
  59. capitalized-comments: [0]
  60. class-methods-use-this: [0]
  61. comma-dangle: [2, only-multiline]
  62. comma-spacing: [2, {before: false, after: true}]
  63. comma-style: [2, last]
  64. complexity: [0]
  65. computed-property-spacing: [2, never]
  66. consistent-return: [0]
  67. consistent-this: [0]
  68. constructor-super: [2]
  69. curly: [0]
  70. default-case-last: [2]
  71. default-case: [0]
  72. default-param-last: [0]
  73. dot-location: [2, property]
  74. dot-notation: [0]
  75. eol-last: [2]
  76. eqeqeq: [2]
  77. for-direction: [2]
  78. func-call-spacing: [2, never]
  79. func-name-matching: [2]
  80. func-names: [0]
  81. func-style: [0]
  82. function-call-argument-newline: [0]
  83. function-paren-newline: [0]
  84. generator-star-spacing: [0]
  85. getter-return: [2]
  86. grouped-accessor-pairs: [2]
  87. guard-for-in: [0]
  88. id-blacklist: [0]
  89. id-length: [0]
  90. id-match: [0]
  91. implicit-arrow-linebreak: [0]
  92. import/default: [0]
  93. import/dynamic-import-chunkname: [0]
  94. import/export: [2]
  95. import/exports-last: [0]
  96. import/extensions: [2, always, {ignorePackages: true}]
  97. import/first: [2]
  98. import/group-exports: [0]
  99. import/max-dependencies: [0]
  100. import/named: [2]
  101. import/namespace: [0]
  102. import/newline-after-import: [0]
  103. import/no-absolute-path: [0]
  104. import/no-amd: [0]
  105. import/no-anonymous-default-export: [0]
  106. import/no-commonjs: [0]
  107. import/no-cycle: [2, {ignoreExternal: true, maxDepth: 1}]
  108. import/no-default-export: [0]
  109. import/no-deprecated: [0]
  110. import/no-dynamic-require: [0]
  111. import/no-extraneous-dependencies: [2]
  112. import/no-import-module-exports: [0]
  113. import/no-internal-modules: [0]
  114. import/no-mutable-exports: [2]
  115. import/no-named-as-default-member: [0]
  116. import/no-named-as-default: [2]
  117. import/no-named-default: [0]
  118. import/no-named-export: [0]
  119. import/no-namespace: [0]
  120. import/no-nodejs-modules: [0]
  121. import/no-relative-packages: [0]
  122. import/no-relative-parent-imports: [0]
  123. import/no-restricted-paths: [0]
  124. import/no-self-import: [2]
  125. import/no-unassigned-import: [0]
  126. import/no-unresolved: [2, {commonjs: true}]
  127. import/no-unused-modules: [2, {unusedExports: true}]
  128. import/no-useless-path-segments: [2, {commonjs: true}]
  129. import/no-webpack-loader-syntax: [2]
  130. import/order: [0]
  131. import/prefer-default-export: [0]
  132. import/unambiguous: [0]
  133. indent: [2, 2, {SwitchCase: 1}]
  134. init-declarations: [0]
  135. jquery/no-ajax-events: [2]
  136. jquery/no-ajax: [0]
  137. jquery/no-animate: [2]
  138. jquery/no-attr: [0]
  139. jquery/no-bind: [2]
  140. jquery/no-class: [0]
  141. jquery/no-clone: [2]
  142. jquery/no-closest: [0]
  143. jquery/no-css: [0]
  144. jquery/no-data: [0]
  145. jquery/no-deferred: [2]
  146. jquery/no-delegate: [2]
  147. jquery/no-each: [0]
  148. jquery/no-extend: [2]
  149. jquery/no-fade: [0]
  150. jquery/no-filter: [0]
  151. jquery/no-find: [0]
  152. jquery/no-global-eval: [2]
  153. jquery/no-grep: [2]
  154. jquery/no-has: [2]
  155. jquery/no-hide: [0]
  156. jquery/no-html: [0]
  157. jquery/no-in-array: [2]
  158. jquery/no-is-array: [2]
  159. jquery/no-is-function: [2]
  160. jquery/no-is: [0]
  161. jquery/no-load: [2]
  162. jquery/no-map: [0]
  163. jquery/no-merge: [2]
  164. jquery/no-param: [2]
  165. jquery/no-parent: [0]
  166. jquery/no-parents: [0]
  167. jquery/no-parse-html: [2]
  168. jquery/no-prop: [0]
  169. jquery/no-proxy: [2]
  170. jquery/no-ready: [0]
  171. jquery/no-serialize: [2]
  172. jquery/no-show: [0]
  173. jquery/no-size: [2]
  174. jquery/no-sizzle: [0]
  175. jquery/no-slide: [0]
  176. jquery/no-submit: [0]
  177. jquery/no-text: [0]
  178. jquery/no-toggle: [0]
  179. jquery/no-trigger: [0]
  180. jquery/no-trim: [2]
  181. jquery/no-val: [0]
  182. jquery/no-when: [2]
  183. jquery/no-wrap: [2]
  184. key-spacing: [2]
  185. keyword-spacing: [2]
  186. line-comment-position: [0]
  187. linebreak-style: [2, unix]
  188. lines-around-comment: [0]
  189. lines-between-class-members: [0]
  190. max-classes-per-file: [0]
  191. max-depth: [0]
  192. max-len: [0]
  193. max-lines-per-function: [0]
  194. max-lines: [0]
  195. max-nested-callbacks: [0]
  196. max-params: [0]
  197. max-statements-per-line: [0]
  198. max-statements: [0]
  199. multiline-comment-style: [2, separate-lines]
  200. multiline-ternary: [0]
  201. new-cap: [0]
  202. new-parens: [2]
  203. newline-per-chained-call: [0]
  204. no-alert: [0]
  205. no-array-constructor: [2]
  206. no-async-promise-executor: [2]
  207. no-await-in-loop: [0]
  208. no-bitwise: [0]
  209. no-buffer-constructor: [0]
  210. no-caller: [2]
  211. no-case-declarations: [2]
  212. no-class-assign: [2]
  213. no-compare-neg-zero: [2]
  214. no-cond-assign: [2, except-parens]
  215. no-confusing-arrow: [0]
  216. no-console: [1, {allow: [info, warn, error]}]
  217. no-const-assign: [2]
  218. no-constant-binary-expression: [2]
  219. no-constant-condition: [0]
  220. no-constructor-return: [2]
  221. no-continue: [0]
  222. no-control-regex: [0]
  223. no-debugger: [1]
  224. no-delete-var: [2]
  225. no-div-regex: [0]
  226. no-dupe-args: [2]
  227. no-dupe-class-members: [2]
  228. no-dupe-else-if: [2]
  229. no-dupe-keys: [2]
  230. no-duplicate-case: [2]
  231. no-duplicate-imports: [2]
  232. no-else-return: [2]
  233. no-empty-character-class: [2]
  234. no-empty-function: [0]
  235. no-empty-pattern: [2]
  236. no-empty: [2, {allowEmptyCatch: true}]
  237. no-eq-null: [2]
  238. no-eval: [2]
  239. no-ex-assign: [2]
  240. no-extend-native: [2]
  241. no-extra-bind: [2]
  242. no-extra-boolean-cast: [2]
  243. no-extra-label: [0]
  244. no-extra-parens: [0]
  245. no-extra-semi: [2]
  246. no-fallthrough: [2]
  247. no-floating-decimal: [0]
  248. no-func-assign: [2]
  249. no-global-assign: [2]
  250. no-implicit-coercion: [0]
  251. no-implicit-globals: [0]
  252. no-implied-eval: [2]
  253. no-import-assign: [2]
  254. no-inline-comments: [0]
  255. no-inner-declarations: [2]
  256. no-invalid-regexp: [2]
  257. no-invalid-this: [0]
  258. no-irregular-whitespace: [2]
  259. no-iterator: [2]
  260. no-label-var: [2]
  261. no-labels: [2]
  262. no-lone-blocks: [2]
  263. no-lonely-if: [0]
  264. no-loop-func: [0]
  265. no-loss-of-precision: [2]
  266. no-magic-numbers: [0]
  267. no-misleading-character-class: [2]
  268. no-mixed-operators: [0]
  269. no-mixed-spaces-and-tabs: [2]
  270. no-multi-assign: [0]
  271. no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
  272. no-multi-str: [2]
  273. no-negated-condition: [0]
  274. no-nested-ternary: [0]
  275. no-new-func: [2]
  276. no-new-object: [2]
  277. no-new-symbol: [2]
  278. no-new-wrappers: [2]
  279. no-new: [0]
  280. no-nonoctal-decimal-escape: [2]
  281. no-obj-calls: [2]
  282. no-octal-escape: [2]
  283. no-octal: [2]
  284. no-param-reassign: [0]
  285. no-plusplus: [0]
  286. no-promise-executor-return: [0]
  287. no-proto: [2]
  288. no-prototype-builtins: [2]
  289. no-redeclare: [2]
  290. no-regex-spaces: [2]
  291. no-restricted-exports: [0]
  292. 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]
  293. no-restricted-imports: [0]
  294. no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
  295. no-return-assign: [0]
  296. no-return-await: [0]
  297. no-script-url: [2]
  298. no-self-assign: [2, {props: true}]
  299. no-self-compare: [2]
  300. no-sequences: [2]
  301. no-setter-return: [2]
  302. no-shadow-restricted-names: [2]
  303. no-shadow: [0]
  304. no-sparse-arrays: [2]
  305. no-tabs: [2]
  306. no-template-curly-in-string: [2]
  307. no-ternary: [0]
  308. no-this-before-super: [2]
  309. no-throw-literal: [2]
  310. no-trailing-spaces: [2]
  311. no-undef-init: [2]
  312. no-undef: [2, {typeof: true}]
  313. no-undefined: [0]
  314. no-underscore-dangle: [0]
  315. no-unexpected-multiline: [2]
  316. no-unmodified-loop-condition: [2]
  317. no-unneeded-ternary: [0]
  318. no-unreachable-loop: [2]
  319. no-unreachable: [2]
  320. no-unsafe-finally: [2]
  321. no-unsafe-negation: [2]
  322. no-unused-expressions: [2]
  323. no-unused-labels: [2]
  324. no-unused-private-class-members: [2]
  325. no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
  326. no-use-before-define: [2, nofunc]
  327. no-useless-backreference: [0]
  328. no-useless-call: [2]
  329. no-useless-catch: [2]
  330. no-useless-computed-key: [2]
  331. no-useless-concat: [2]
  332. no-useless-constructor: [2]
  333. no-useless-escape: [2]
  334. no-useless-rename: [2]
  335. no-useless-return: [2]
  336. no-var: [2]
  337. no-void: [2]
  338. no-warning-comments: [0]
  339. no-whitespace-before-property: [2]
  340. no-with: [2]
  341. nonblock-statement-body-position: [2]
  342. object-curly-newline: [0]
  343. object-curly-spacing: [2, never]
  344. object-shorthand: [2, always]
  345. one-var-declaration-per-line: [0]
  346. one-var: [0]
  347. operator-assignment: [2, always]
  348. operator-linebreak: [2, after]
  349. padded-blocks: [2, never]
  350. padding-line-between-statements: [0]
  351. prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
  352. prefer-const: [2, {destructuring: all}]
  353. prefer-destructuring: [0]
  354. prefer-exponentiation-operator: [2]
  355. prefer-named-capture-group: [0]
  356. prefer-numeric-literals: [2]
  357. prefer-object-has-own: [0]
  358. prefer-object-spread: [0]
  359. prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
  360. prefer-regex-literals: [2]
  361. prefer-rest-params: [2]
  362. prefer-spread: [2]
  363. prefer-template: [2]
  364. quote-props: [0]
  365. quotes: [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
  366. radix: [2, as-needed]
  367. require-atomic-updates: [0]
  368. require-await: [0]
  369. require-unicode-regexp: [0]
  370. require-yield: [2]
  371. rest-spread-spacing: [2, never]
  372. semi-spacing: [2, {before: false, after: true}]
  373. semi-style: [2, last]
  374. semi: [2, always, {omitLastInOneLineBlock: true}]
  375. sort-imports: [0]
  376. sort-keys: [0]
  377. sort-vars: [0]
  378. space-before-blocks: [2, always]
  379. space-in-parens: [2, never]
  380. space-infix-ops: [2]
  381. space-unary-ops: [2]
  382. spaced-comment: [2, always]
  383. strict: [0]
  384. switch-colon-spacing: [2]
  385. symbol-description: [2]
  386. template-curly-spacing: [2, never]
  387. template-tag-spacing: [2, never]
  388. unicode-bom: [2, never]
  389. unicorn/better-regex: [0]
  390. unicorn/catch-error-name: [0]
  391. unicorn/consistent-destructuring: [2]
  392. unicorn/consistent-function-scoping: [2]
  393. unicorn/custom-error-definition: [0]
  394. unicorn/empty-brace-spaces: [2]
  395. unicorn/error-message: [0]
  396. unicorn/escape-case: [0]
  397. unicorn/expiring-todo-comments: [0]
  398. unicorn/explicit-length-check: [0]
  399. unicorn/filename-case: [0]
  400. unicorn/import-index: [0]
  401. unicorn/import-style: [0]
  402. unicorn/new-for-builtins: [2]
  403. unicorn/no-abusive-eslint-disable: [0]
  404. unicorn/no-array-for-each: [2]
  405. unicorn/no-array-instanceof: [0]
  406. unicorn/no-array-method-this-argument: [2]
  407. unicorn/no-array-push-push: [2]
  408. unicorn/no-await-expression-member: [0]
  409. unicorn/no-console-spaces: [0]
  410. unicorn/no-document-cookie: [2]
  411. unicorn/no-empty-file: [2]
  412. unicorn/no-fn-reference-in-iterator: [0]
  413. unicorn/no-for-loop: [0]
  414. unicorn/no-hex-escape: [0]
  415. unicorn/no-invalid-remove-event-listener: [2]
  416. unicorn/no-keyword-prefix: [0]
  417. unicorn/no-lonely-if: [2]
  418. unicorn/no-nested-ternary: [0]
  419. unicorn/no-new-array: [0]
  420. unicorn/no-new-buffer: [0]
  421. unicorn/no-null: [0]
  422. unicorn/no-object-as-default-parameter: [2]
  423. unicorn/no-process-exit: [0]
  424. unicorn/no-reduce: [2]
  425. unicorn/no-static-only-class: [2]
  426. unicorn/no-thenable: [2]
  427. unicorn/no-this-assignment: [2]
  428. unicorn/no-unreadable-array-destructuring: [0]
  429. unicorn/no-unreadable-iife: [2]
  430. unicorn/no-unsafe-regex: [0]
  431. unicorn/no-unused-properties: [2]
  432. unicorn/no-useless-fallback-in-spread: [2]
  433. unicorn/no-useless-length-check: [2]
  434. unicorn/no-useless-promise-resolve-reject: [2]
  435. unicorn/no-useless-spread: [2]
  436. unicorn/no-useless-switch-case: [2]
  437. unicorn/no-useless-undefined: [0]
  438. unicorn/no-zero-fractions: [2]
  439. unicorn/number-literal-case: [0]
  440. unicorn/numeric-separators-style: [0]
  441. unicorn/prefer-add-event-listener: [2]
  442. unicorn/prefer-array-find: [2]
  443. unicorn/prefer-array-flat-map: [2]
  444. unicorn/prefer-array-flat: [2]
  445. unicorn/prefer-array-index-of: [2]
  446. unicorn/prefer-array-some: [2]
  447. unicorn/prefer-at: [0]
  448. unicorn/prefer-code-point: [2]
  449. unicorn/prefer-dataset: [2]
  450. unicorn/prefer-date-now: [2]
  451. unicorn/prefer-default-parameters: [0]
  452. unicorn/prefer-event-key: [2]
  453. unicorn/prefer-export-from: [2]
  454. unicorn/prefer-includes: [2]
  455. unicorn/prefer-json-parse-buffer: [0]
  456. unicorn/prefer-math-trunc: [2]
  457. unicorn/prefer-modern-dom-apis: [0]
  458. unicorn/prefer-modern-math-apis: [2]
  459. unicorn/prefer-module: [2]
  460. unicorn/prefer-native-coercion-functions: [2]
  461. unicorn/prefer-negative-index: [2]
  462. unicorn/prefer-node-append: [0]
  463. unicorn/prefer-node-protocol: [0]
  464. unicorn/prefer-node-remove: [0]
  465. unicorn/prefer-number-properties: [0]
  466. unicorn/prefer-object-from-entries: [2]
  467. unicorn/prefer-object-has-own: [0]
  468. unicorn/prefer-optional-catch-binding: [2]
  469. unicorn/prefer-prototype-methods: [0]
  470. unicorn/prefer-query-selector: [0]
  471. unicorn/prefer-reflect-apply: [0]
  472. unicorn/prefer-regexp-test: [2]
  473. unicorn/prefer-replace-all: [0]
  474. unicorn/prefer-set-has: [0]
  475. unicorn/prefer-spread: [0]
  476. unicorn/prefer-starts-ends-with: [2]
  477. unicorn/prefer-string-slice: [0]
  478. unicorn/prefer-switch: [0]
  479. unicorn/prefer-ternary: [0]
  480. unicorn/prefer-text-content: [2]
  481. unicorn/prefer-top-level-await: [0]
  482. unicorn/prefer-trim-start-end: [2]
  483. unicorn/prefer-type-error: [0]
  484. unicorn/prevent-abbreviations: [0]
  485. unicorn/relative-url-style: [2]
  486. unicorn/require-array-join-separator: [2]
  487. unicorn/require-number-to-fixed-digits-argument: [2]
  488. unicorn/require-post-message-target-origin: [0]
  489. unicorn/string-content: [0]
  490. unicorn/template-indent: [2]
  491. unicorn/text-encoding-identifier-case: [0]
  492. unicorn/throw-new-error: [2]
  493. use-isnan: [2]
  494. valid-typeof: [2, {requireStringLiterals: true}]
  495. vars-on-top: [0]
  496. vue/attributes-order: [0]
  497. vue/component-definition-name-casing: [0]
  498. vue/html-closing-bracket-spacing: [0]
  499. vue/max-attributes-per-line: [0]
  500. vue/one-component-per-file: [0]
  501. wrap-iife: [2, inside]
  502. wrap-regex: [0]
  503. yield-star-spacing: [2, after]
  504. yoda: [2, never]