Skip to content

Commit c3d4c98

Browse files
authored
Merge branch 'main' into branch-with-prefix
2 parents ba30dbd + 498352c commit c3d4c98

File tree

387 files changed

+13194
-6550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+13194
-6550
lines changed

.drone.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525
- make deps-frontend
2626

2727
- name: deps-backend
28-
image: golang:1.18
28+
image: golang:1.19
2929
pull: always
3030
commands:
3131
- make deps-backend
@@ -88,7 +88,7 @@ steps:
8888
depends_on: [deps-frontend]
8989

9090
- name: checks-backend
91-
image: golang:1.18
91+
image: golang:1.19
9292
commands:
9393
- make checks-backend
9494
depends_on: [deps-backend]
@@ -122,7 +122,7 @@ steps:
122122
path: /go
123123

124124
- name: build-backend-arm64
125-
image: golang:1.18
125+
image: golang:1.19
126126
environment:
127127
GO111MODULE: on
128128
GOPROXY: https://goproxy.io
@@ -138,7 +138,7 @@ steps:
138138
path: /go
139139

140140
- name: build-backend-windows
141-
image: golang:1.18
141+
image: golang:1.19
142142
environment:
143143
GO111MODULE: on
144144
GOPROXY: https://goproxy.io
@@ -153,7 +153,7 @@ steps:
153153
path: /go
154154

155155
- name: build-backend-386
156-
image: golang:1.18
156+
image: golang:1.19
157157
environment:
158158
GO111MODULE: on
159159
GOPROXY: https://goproxy.io
@@ -243,7 +243,7 @@ steps:
243243
- pull_request
244244

245245
- name: deps-backend
246-
image: golang:1.18
246+
image: golang:1.19
247247
pull: always
248248
commands:
249249
- make deps-backend
@@ -360,7 +360,7 @@ steps:
360360
path: /go
361361

362362
- name: generate-coverage
363-
image: golang:1.18
363+
image: golang:1.19
364364
commands:
365365
- make coverage
366366
environment:
@@ -436,7 +436,7 @@ steps:
436436
- pull_request
437437

438438
- name: deps-backend
439-
image: golang:1.18
439+
image: golang:1.19
440440
pull: always
441441
commands:
442442
- make deps-backend
@@ -578,7 +578,7 @@ trigger:
578578

579579
steps:
580580
- name: download
581-
image: golang:1.18
581+
image: golang:1.19
582582
pull: always
583583
commands:
584584
- timeout -s ABRT 40m make generate-license generate-gitignore
@@ -640,7 +640,7 @@ steps:
640640
- make deps-frontend
641641

642642
- name: deps-backend
643-
image: golang:1.18
643+
image: golang:1.19
644644
pull: always
645645
commands:
646646
- make deps-backend
@@ -649,10 +649,11 @@ steps:
649649
path: /go
650650

651651
- name: static
652-
image: techknowlogick/xgo:go-1.18.x
652+
image: techknowlogick/xgo:go-1.19.x
653653
pull: always
654654
commands:
655-
- curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
655+
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
656+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
656657
- export PATH=$PATH:$GOPATH/bin
657658
- make release
658659
environment:
@@ -759,7 +760,7 @@ steps:
759760
- make deps-frontend
760761

761762
- name: deps-backend
762-
image: golang:1.18
763+
image: golang:1.19
763764
pull: always
764765
commands:
765766
- make deps-backend
@@ -768,10 +769,11 @@ steps:
768769
path: /go
769770

770771
- name: static
771-
image: techknowlogick/xgo:go-1.18.x
772+
image: techknowlogick/xgo:go-1.19.x
772773
pull: always
773774
commands:
774-
- curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
775+
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
776+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
775777
- export PATH=$PATH:$GOPATH/bin
776778
- make release
777779
environment:

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,3 @@ indent_style = tab
2626

2727
[*.svg]
2828
insert_final_newline = false
29-
30-
[*.md]
31-
trim_trailing_whitespace = false

.eslintrc.yaml

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@ parserOptions:
1111
plugins:
1212
- eslint-plugin-unicorn
1313
- eslint-plugin-import
14-
- eslint-plugin-vue
15-
- eslint-plugin-html
1614
- eslint-plugin-jquery
17-
18-
extends:
19-
- plugin:vue/recommended
15+
- eslint-plugin-sonarjs
2016

2117
env:
2218
es2022: true
@@ -25,23 +21,16 @@ env:
2521
globals:
2622
__webpack_public_path__: true
2723

28-
settings:
29-
html/html-extensions: [".tmpl"]
30-
3124
overrides:
32-
- files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
25+
- files: ["web_src/**/*.js", "docs/**/*.js"]
3326
env:
3427
browser: true
3528
node: false
36-
- files: ["templates/**/*.tmpl"]
37-
rules:
38-
no-tabs: [0]
39-
indent: [2, tab, {SwitchCase: 1}]
4029
- files: ["web_src/**/*worker.js"]
4130
env:
4231
worker: true
4332
rules:
44-
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]
33+
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, 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]
4534
- files: ["build/generate-images.js"]
4635
rules:
4736
import/no-unresolved: [0]
@@ -120,7 +109,7 @@ rules:
120109
import/no-extraneous-dependencies: [2]
121110
import/no-import-module-exports: [0]
122111
import/no-internal-modules: [0]
123-
import/no-mutable-exports: [2]
112+
import/no-mutable-exports: [0]
124113
import/no-named-as-default-member: [0]
125114
import/no-named-as-default: [2]
126115
import/no-named-default: [0]
@@ -132,7 +121,7 @@ rules:
132121
import/no-restricted-paths: [0]
133122
import/no-self-import: [2]
134123
import/no-unassigned-import: [0]
135-
import/no-unresolved: [2, {commonjs: true}]
124+
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
136125
import/no-unused-modules: [2, {unusedExports: true}]
137126
import/no-useless-path-segments: [2, {commonjs: true}]
138127
import/no-webpack-loader-syntax: [2]
@@ -222,7 +211,7 @@ rules:
222211
no-compare-neg-zero: [2]
223212
no-cond-assign: [2, except-parens]
224213
no-confusing-arrow: [0]
225-
no-console: [1, {allow: [info, warn, error]}]
214+
no-console: [1, {allow: [debug, info, warn, error]}]
226215
no-const-assign: [2]
227216
no-constant-binary-expression: [2]
228217
no-constant-condition: [0]
@@ -298,7 +287,7 @@ rules:
298287
no-redeclare: [2]
299288
no-regex-spaces: [2]
300289
no-restricted-exports: [0]
301-
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]
290+
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, __dirname, __filename]
302291
no-restricted-imports: [0]
303292
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
304293
no-return-assign: [0]
@@ -332,7 +321,7 @@ rules:
332321
no-unused-labels: [2]
333322
no-unused-private-class-members: [2]
334323
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
335-
no-use-before-define: [2, nofunc]
324+
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
336325
no-useless-backreference: [0]
337326
no-useless-call: [2]
338327
no-useless-catch: [2]
@@ -358,7 +347,7 @@ rules:
358347
padded-blocks: [2, never]
359348
padding-line-between-statements: [0]
360349
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
361-
prefer-const: [2, {destructuring: all}]
350+
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
362351
prefer-destructuring: [0]
363352
prefer-exponentiation-operator: [2]
364353
prefer-named-capture-group: [0]
@@ -381,6 +370,38 @@ rules:
381370
semi-spacing: [2, {before: false, after: true}]
382371
semi-style: [2, last]
383372
semi: [2, always, {omitLastInOneLineBlock: true}]
373+
sonarjs/cognitive-complexity: [0]
374+
sonarjs/elseif-without-else: [0]
375+
sonarjs/max-switch-cases: [0]
376+
sonarjs/no-all-duplicated-branches: [2]
377+
sonarjs/no-collapsible-if: [0]
378+
sonarjs/no-collection-size-mischeck: [2]
379+
sonarjs/no-duplicate-string: [0]
380+
sonarjs/no-duplicated-branches: [0]
381+
sonarjs/no-element-overwrite: [2]
382+
sonarjs/no-empty-collection: [2]
383+
sonarjs/no-extra-arguments: [0]
384+
sonarjs/no-gratuitous-expressions: [2]
385+
sonarjs/no-identical-conditions: [2]
386+
sonarjs/no-identical-expressions: [0]
387+
sonarjs/no-identical-functions: [0]
388+
sonarjs/no-ignored-return: [2]
389+
sonarjs/no-inverted-boolean-check: [2]
390+
sonarjs/no-nested-switch: [0]
391+
sonarjs/no-nested-template-literals: [0]
392+
sonarjs/no-one-iteration-loop: [2]
393+
sonarjs/no-redundant-boolean: [2]
394+
sonarjs/no-redundant-jump: [0]
395+
sonarjs/no-same-line-conditional: [2]
396+
sonarjs/no-small-switch: [0]
397+
sonarjs/no-unused-collection: [2]
398+
sonarjs/no-use-of-empty-return-value: [2]
399+
sonarjs/no-useless-catch: [0]
400+
sonarjs/non-existent-operator: [2]
401+
sonarjs/prefer-immediate-return: [0]
402+
sonarjs/prefer-object-literal: [0]
403+
sonarjs/prefer-single-boolean-return: [0]
404+
sonarjs/prefer-while: [2]
384405
sort-imports: [0]
385406
sort-keys: [0]
386407
sort-vars: [0]
@@ -428,7 +449,7 @@ rules:
428449
unicorn/no-new-array: [0]
429450
unicorn/no-new-buffer: [0]
430451
unicorn/no-null: [0]
431-
unicorn/no-object-as-default-parameter: [2]
452+
unicorn/no-object-as-default-parameter: [0]
432453
unicorn/no-process-exit: [0]
433454
unicorn/no-reduce: [2]
434455
unicorn/no-static-only-class: [2]
@@ -454,14 +475,16 @@ rules:
454475
unicorn/prefer-array-index-of: [2]
455476
unicorn/prefer-array-some: [2]
456477
unicorn/prefer-at: [0]
457-
unicorn/prefer-code-point: [2]
478+
unicorn/prefer-code-point: [0]
458479
unicorn/prefer-dataset: [2]
459480
unicorn/prefer-date-now: [2]
460481
unicorn/prefer-default-parameters: [0]
461482
unicorn/prefer-event-key: [2]
483+
unicorn/prefer-event-target: [2]
462484
unicorn/prefer-export-from: [2]
463485
unicorn/prefer-includes: [2]
464486
unicorn/prefer-json-parse-buffer: [0]
487+
unicorn/prefer-logical-operator-over-ternary: [2]
465488
unicorn/prefer-math-trunc: [2]
466489
unicorn/prefer-modern-dom-apis: [0]
467490
unicorn/prefer-modern-math-apis: [2]
@@ -502,11 +525,6 @@ rules:
502525
use-isnan: [2]
503526
valid-typeof: [2, {requireStringLiterals: true}]
504527
vars-on-top: [0]
505-
vue/attributes-order: [0]
506-
vue/component-definition-name-casing: [0]
507-
vue/html-closing-bracket-spacing: [0]
508-
vue/max-attributes-per-line: [0]
509-
vue/one-component-per-file: [0]
510528
wrap-iife: [2, inside]
511529
wrap-regex: [0]
512530
yield-star-spacing: [2, after]

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ linters:
2929
fast: false
3030

3131
run:
32-
go: 1.18
32+
go: 1.19
3333
timeout: 10m
3434
skip-dirs:
3535
- node_modules
@@ -75,7 +75,7 @@ linters-settings:
7575
- name: modifies-value-receiver
7676
gofumpt:
7777
extra-rules: true
78-
lang-version: "1.18"
78+
lang-version: "1.19"
7979
depguard:
8080
# TODO: use depguard to replace import checks in gitea-vet
8181
list-type: denylist

.markdownlint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
commands-show-output: false
2+
fenced-code-language: false
3+
first-line-h1: false
4+
header-increment: false
5+
line-length: {code_blocks: false, tables: false, stern: true, line_length: -1}
6+
no-alt-text: false
7+
no-bare-urls: false
8+
no-blanks-blockquote: false
9+
no-duplicate-header: {allow_different_nesting: true}
10+
no-emphasis-as-header: false
11+
no-empty-links: false
12+
no-hard-tabs: {code_blocks: false}
13+
no-inline-html: false
14+
no-space-in-code: false
15+
no-space-in-emphasis: false
16+
no-trailing-punctuation: false
17+
no-trailing-spaces: {br_spaces: 0}
18+
single-h1: false

0 commit comments

Comments
 (0)