Skip to content

Commit 10463ec

Browse files
Merge branch 'main' into Badge
2 parents d681313 + 01dec75 commit 10463ec

File tree

851 files changed

+21449
-39648
lines changed

Some content is hidden

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

851 files changed

+21449
-39648
lines changed

.air.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ exclude_dir = [
2121
]
2222
exclude_regex = ["_test.go$", "_gen.go$"]
2323
stop_on_error = true
24+
25+
[log]
26+
main_only = true

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.eslintrc.yaml

Lines changed: 172 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,28 @@ ignorePatterns:
66
- /web_src/fomantic
77
- /public/assets/js
88

9+
parser: "@typescript-eslint/parser"
10+
911
parserOptions:
1012
sourceType: module
1113
ecmaVersion: latest
14+
project: true
15+
extraFileExtensions: [".vue"]
16+
parser: "@typescript-eslint/parser" # for vue plugin - https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
17+
18+
settings:
19+
import/extensions: [".js", ".ts"]
20+
import/parsers:
21+
"@typescript-eslint/parser": [".js", ".ts"]
22+
import/resolver:
23+
typescript: true
1224

1325
plugins:
1426
- "@eslint-community/eslint-plugin-eslint-comments"
1527
- "@stylistic/eslint-plugin-js"
28+
- "@typescript-eslint/eslint-plugin"
1629
- eslint-plugin-array-func
30+
- eslint-plugin-deprecation
1731
- eslint-plugin-github
1832
- eslint-plugin-i
1933
- eslint-plugin-no-jquery
@@ -46,7 +60,15 @@ overrides:
4660
- files: ["*.config.*"]
4761
rules:
4862
i/no-unused-modules: [0]
49-
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
63+
- files: ["**/*.d.ts"]
64+
rules:
65+
i/no-unused-modules: [0]
66+
"@typescript-eslint/consistent-type-definitions": [0]
67+
"@typescript-eslint/consistent-type-imports": [0]
68+
- files: ["web_src/js/types.ts"]
69+
rules:
70+
i/no-unused-modules: [0]
71+
- files: ["**/*.test.*", "web_src/js/test/setup.ts"]
5072
env:
5173
vitest-globals/env: true
5274
rules:
@@ -99,9 +121,25 @@ overrides:
99121
vitest/valid-describe-callback: [2]
100122
vitest/valid-expect: [2]
101123
vitest/valid-title: [2]
102-
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
124+
- files: ["web_src/js/modules/fetch.ts", "web_src/js/standalone/**/*"]
103125
rules:
104126
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
127+
- files: ["**/*.vue"]
128+
plugins:
129+
- eslint-plugin-vue
130+
- eslint-plugin-vue-scoped-css
131+
extends:
132+
- plugin:vue/vue3-recommended
133+
- plugin:vue-scoped-css/vue3-recommended
134+
rules:
135+
vue/attributes-order: [0]
136+
vue/html-closing-bracket-spacing: [2, {startTag: never, endTag: never, selfClosingTag: never}]
137+
vue/max-attributes-per-line: [0]
138+
vue/singleline-html-element-content-newline: [0]
139+
- files: ["tests/e2e/**"]
140+
plugins:
141+
- eslint-plugin-playwright
142+
extends: plugin:playwright/recommended
105143

106144
rules:
107145
"@eslint-community/eslint-comments/disable-enable-pair": [2]
@@ -181,6 +219,125 @@ rules:
181219
"@stylistic/js/wrap-iife": [2, inside]
182220
"@stylistic/js/wrap-regex": [0]
183221
"@stylistic/js/yield-star-spacing": [2, after]
222+
"@typescript-eslint/adjacent-overload-signatures": [0]
223+
"@typescript-eslint/array-type": [0]
224+
"@typescript-eslint/await-thenable": [2]
225+
"@typescript-eslint/ban-ts-comment": [2, {'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': false, 'ts-check': false}]
226+
"@typescript-eslint/ban-tslint-comment": [0]
227+
"@typescript-eslint/class-literal-property-style": [0]
228+
"@typescript-eslint/class-methods-use-this": [0]
229+
"@typescript-eslint/consistent-generic-constructors": [0]
230+
"@typescript-eslint/consistent-indexed-object-style": [0]
231+
"@typescript-eslint/consistent-return": [0]
232+
"@typescript-eslint/consistent-type-assertions": [2, {assertionStyle: as, objectLiteralTypeAssertions: allow}]
233+
"@typescript-eslint/consistent-type-definitions": [2, type]
234+
"@typescript-eslint/consistent-type-exports": [2, {fixMixedExportsWithInlineTypeSpecifier: false}]
235+
"@typescript-eslint/consistent-type-imports": [2, {prefer: type-imports, fixStyle: separate-type-imports, disallowTypeAnnotations: true}]
236+
"@typescript-eslint/default-param-last": [0]
237+
"@typescript-eslint/dot-notation": [0]
238+
"@typescript-eslint/explicit-function-return-type": [0]
239+
"@typescript-eslint/explicit-member-accessibility": [0]
240+
"@typescript-eslint/explicit-module-boundary-types": [0]
241+
"@typescript-eslint/init-declarations": [0]
242+
"@typescript-eslint/max-params": [0]
243+
"@typescript-eslint/member-ordering": [0]
244+
"@typescript-eslint/method-signature-style": [0]
245+
"@typescript-eslint/naming-convention": [0]
246+
"@typescript-eslint/no-array-constructor": [2]
247+
"@typescript-eslint/no-array-delete": [2]
248+
"@typescript-eslint/no-base-to-string": [0]
249+
"@typescript-eslint/no-confusing-non-null-assertion": [2]
250+
"@typescript-eslint/no-confusing-void-expression": [0]
251+
"@typescript-eslint/no-dupe-class-members": [0]
252+
"@typescript-eslint/no-duplicate-enum-values": [2]
253+
"@typescript-eslint/no-duplicate-type-constituents": [2, {ignoreUnions: true}]
254+
"@typescript-eslint/no-dynamic-delete": [0]
255+
"@typescript-eslint/no-empty-function": [0]
256+
"@typescript-eslint/no-empty-interface": [0]
257+
"@typescript-eslint/no-empty-object-type": [2]
258+
"@typescript-eslint/no-explicit-any": [0]
259+
"@typescript-eslint/no-extra-non-null-assertion": [2]
260+
"@typescript-eslint/no-extraneous-class": [0]
261+
"@typescript-eslint/no-floating-promises": [0]
262+
"@typescript-eslint/no-for-in-array": [2]
263+
"@typescript-eslint/no-implied-eval": [2]
264+
"@typescript-eslint/no-import-type-side-effects": [0] # dupe with consistent-type-imports
265+
"@typescript-eslint/no-inferrable-types": [0]
266+
"@typescript-eslint/no-invalid-this": [0]
267+
"@typescript-eslint/no-invalid-void-type": [0]
268+
"@typescript-eslint/no-loop-func": [0]
269+
"@typescript-eslint/no-loss-of-precision": [0]
270+
"@typescript-eslint/no-magic-numbers": [0]
271+
"@typescript-eslint/no-meaningless-void-operator": [0]
272+
"@typescript-eslint/no-misused-new": [2]
273+
"@typescript-eslint/no-misused-promises": [2, {checksVoidReturn: {attributes: false, arguments: false}}]
274+
"@typescript-eslint/no-mixed-enums": [0]
275+
"@typescript-eslint/no-namespace": [2]
276+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": [0]
277+
"@typescript-eslint/no-non-null-asserted-optional-chain": [2]
278+
"@typescript-eslint/no-non-null-assertion": [0]
279+
"@typescript-eslint/no-redeclare": [0]
280+
"@typescript-eslint/no-redundant-type-constituents": [2]
281+
"@typescript-eslint/no-require-imports": [2]
282+
"@typescript-eslint/no-restricted-imports": [0]
283+
"@typescript-eslint/no-restricted-types": [0]
284+
"@typescript-eslint/no-shadow": [0]
285+
"@typescript-eslint/no-this-alias": [0] # handled by unicorn/no-this-assignment
286+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [0]
287+
"@typescript-eslint/no-unnecessary-condition": [0]
288+
"@typescript-eslint/no-unnecessary-qualifier": [0]
289+
"@typescript-eslint/no-unnecessary-template-expression": [0]
290+
"@typescript-eslint/no-unnecessary-type-arguments": [0]
291+
"@typescript-eslint/no-unnecessary-type-assertion": [2]
292+
"@typescript-eslint/no-unnecessary-type-constraint": [2]
293+
"@typescript-eslint/no-unsafe-argument": [0]
294+
"@typescript-eslint/no-unsafe-assignment": [0]
295+
"@typescript-eslint/no-unsafe-call": [0]
296+
"@typescript-eslint/no-unsafe-declaration-merging": [2]
297+
"@typescript-eslint/no-unsafe-enum-comparison": [2]
298+
"@typescript-eslint/no-unsafe-function-type": [2]
299+
"@typescript-eslint/no-unsafe-member-access": [0]
300+
"@typescript-eslint/no-unsafe-return": [0]
301+
"@typescript-eslint/no-unsafe-unary-minus": [2]
302+
"@typescript-eslint/no-unused-expressions": [0]
303+
"@typescript-eslint/no-unused-vars": [2, {vars: all, args: all, caughtErrors: all, ignoreRestSiblings: false, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_}]
304+
"@typescript-eslint/no-use-before-define": [0]
305+
"@typescript-eslint/no-useless-constructor": [0]
306+
"@typescript-eslint/no-useless-empty-export": [0]
307+
"@typescript-eslint/no-wrapper-object-types": [2]
308+
"@typescript-eslint/non-nullable-type-assertion-style": [0]
309+
"@typescript-eslint/only-throw-error": [2]
310+
"@typescript-eslint/parameter-properties": [0]
311+
"@typescript-eslint/prefer-as-const": [2]
312+
"@typescript-eslint/prefer-destructuring": [0]
313+
"@typescript-eslint/prefer-enum-initializers": [0]
314+
"@typescript-eslint/prefer-find": [2]
315+
"@typescript-eslint/prefer-for-of": [2]
316+
"@typescript-eslint/prefer-function-type": [2]
317+
"@typescript-eslint/prefer-includes": [2]
318+
"@typescript-eslint/prefer-literal-enum-member": [0]
319+
"@typescript-eslint/prefer-namespace-keyword": [0]
320+
"@typescript-eslint/prefer-nullish-coalescing": [0]
321+
"@typescript-eslint/prefer-optional-chain": [2, {requireNullish: true}]
322+
"@typescript-eslint/prefer-promise-reject-errors": [0]
323+
"@typescript-eslint/prefer-readonly": [0]
324+
"@typescript-eslint/prefer-readonly-parameter-types": [0]
325+
"@typescript-eslint/prefer-reduce-type-parameter": [0]
326+
"@typescript-eslint/prefer-regexp-exec": [0]
327+
"@typescript-eslint/prefer-return-this-type": [0]
328+
"@typescript-eslint/prefer-string-starts-ends-with": [2, {allowSingleElementEquality: always}]
329+
"@typescript-eslint/promise-function-async": [0]
330+
"@typescript-eslint/require-array-sort-compare": [0]
331+
"@typescript-eslint/require-await": [0]
332+
"@typescript-eslint/restrict-plus-operands": [2]
333+
"@typescript-eslint/restrict-template-expressions": [0]
334+
"@typescript-eslint/return-await": [0]
335+
"@typescript-eslint/strict-boolean-expressions": [0]
336+
"@typescript-eslint/switch-exhaustiveness-check": [0]
337+
"@typescript-eslint/triple-slash-reference": [2]
338+
"@typescript-eslint/typedef": [0]
339+
"@typescript-eslint/unbound-method": [0] # too many false-positives
340+
"@typescript-eslint/unified-signatures": [2]
184341
accessor-pairs: [2]
185342
array-callback-return: [2, {checkForEach: true}]
186343
array-func/avoid-reverse: [2]
@@ -202,6 +359,7 @@ rules:
202359
default-case-last: [2]
203360
default-case: [0]
204361
default-param-last: [0]
362+
deprecation/deprecation: [2]
205363
dot-notation: [0]
206364
eqeqeq: [2]
207365
for-direction: [2]
@@ -263,7 +421,7 @@ rules:
263421
i/no-internal-modules: [0]
264422
i/no-mutable-exports: [0]
265423
i/no-named-as-default-member: [0]
266-
i/no-named-as-default: [2]
424+
i/no-named-as-default: [0]
267425
i/no-named-default: [0]
268426
i/no-named-export: [0]
269427
i/no-namespace: [0]
@@ -273,7 +431,7 @@ rules:
273431
i/no-restricted-paths: [0]
274432
i/no-self-import: [2]
275433
i/no-unassigned-import: [0]
276-
i/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$", ^vitest/]}]
434+
i/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
277435
i/no-unused-modules: [2, {unusedExports: true}]
278436
i/no-useless-path-segments: [2, {commonjs: true}]
279437
i/no-webpack-loader-syntax: [2]
@@ -293,7 +451,7 @@ rules:
293451
multiline-comment-style: [2, separate-lines]
294452
new-cap: [0]
295453
no-alert: [0]
296-
no-array-constructor: [2]
454+
no-array-constructor: [0] # handled by @typescript-eslint/no-array-constructor
297455
no-async-promise-executor: [0]
298456
no-await-in-loop: [0]
299457
no-bitwise: [0]
@@ -318,7 +476,7 @@ rules:
318476
no-dupe-else-if: [2]
319477
no-dupe-keys: [2]
320478
no-duplicate-case: [2]
321-
no-duplicate-imports: [2]
479+
no-duplicate-imports: [0]
322480
no-else-return: [2]
323481
no-empty-character-class: [2]
324482
no-empty-function: [0]
@@ -337,7 +495,7 @@ rules:
337495
no-global-assign: [2]
338496
no-implicit-coercion: [2]
339497
no-implicit-globals: [0]
340-
no-implied-eval: [2]
498+
no-implied-eval: [0] # handled by @typescript-eslint/no-implied-eval
341499
no-import-assign: [2]
342500
no-inline-comments: [0]
343501
no-inner-declarations: [2]
@@ -356,7 +514,7 @@ rules:
356514
no-jquery/no-box-model: [2]
357515
no-jquery/no-browser: [2]
358516
no-jquery/no-camel-case: [2]
359-
no-jquery/no-class-state: [0]
517+
no-jquery/no-class-state: [2]
360518
no-jquery/no-class: [0]
361519
no-jquery/no-clone: [2]
362520
no-jquery/no-closest: [0]
@@ -412,7 +570,7 @@ rules:
412570
no-jquery/no-param: [2]
413571
no-jquery/no-parent: [0]
414572
no-jquery/no-parents: [2]
415-
no-jquery/no-parse-html-literal: [0]
573+
no-jquery/no-parse-html-literal: [2]
416574
no-jquery/no-parse-html: [2]
417575
no-jquery/no-parse-json: [2]
418576
no-jquery/no-parse-xml: [2]
@@ -465,12 +623,12 @@ rules:
465623
no-promise-executor-return: [0]
466624
no-proto: [2]
467625
no-prototype-builtins: [2]
468-
no-redeclare: [2]
626+
no-redeclare: [0] # must be disabled for typescript overloads
469627
no-regex-spaces: [2]
470628
no-restricted-exports: [0]
471629
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]
472630
no-restricted-imports: [0]
473-
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
631+
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.ts instead"}]
474632
no-return-assign: [0]
475633
no-script-url: [2]
476634
no-self-assign: [2, {props: true}]
@@ -498,7 +656,7 @@ rules:
498656
no-unused-expressions: [2]
499657
no-unused-labels: [2]
500658
no-unused-private-class-members: [2]
501-
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
659+
no-unused-vars: [0] # handled by @typescript-eslint/no-unused-vars
502660
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
503661
no-use-extend-native/no-use-extend-native: [2]
504662
no-useless-backreference: [2]
@@ -613,7 +771,7 @@ rules:
613771
regexp/unicode-escape: [0]
614772
regexp/use-ignore-case: [0]
615773
require-atomic-updates: [0]
616-
require-await: [0]
774+
require-await: [0] # handled by @typescript-eslint/require-await
617775
require-unicode-regexp: [0]
618776
require-yield: [2]
619777
sonarjs/cognitive-complexity: [0]
@@ -687,6 +845,7 @@ rules:
687845
unicorn/no-invalid-fetch-options: [2]
688846
unicorn/no-invalid-remove-event-listener: [2]
689847
unicorn/no-keyword-prefix: [0]
848+
unicorn/no-length-as-slice-end: [2]
690849
unicorn/no-lonely-if: [2]
691850
unicorn/no-magic-array-flat-depth: [0]
692851
unicorn/no-negated-condition: [0]

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body:
1111
value: |
1212
1. Please speak English, this is the language all maintainers can speak and write.
1313
2. Please ask questions or configuration/deploy problems on our Discord
14-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1515
3. Make sure you are using the latest release and
1616
take a moment to check that your issue hasn't been reported before.
1717
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contact_links:
77
url: https://discord.gg/Gitea
88
about: Please ask questions and discuss configuration or deployment problems here.
99
- name: Discourse Forum
10-
url: https://discourse.gitea.io
10+
url: https://forum.gitea.com
1111
about: Questions and configuration or deployment problems can also be discussed on our forum.
1212
- name: Frequently Asked Questions
1313
url: https://docs.gitea.com/help/faq

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
value: |
88
1. Please speak English, this is the language all maintainers can speak and write.
99
2. Please ask questions or configuration/deploy problems on our Discord
10-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
10+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1111
3. Please take a moment to check that your feature hasn't already been suggested.
1212
- type: textarea
1313
id: description

.github/ISSUE_TEMPLATE/ui.bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body:
1111
value: |
1212
1. Please speak English, this is the language all maintainers can speak and write.
1313
2. Please ask questions or configuration/deploy problems on our Discord
14-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1515
3. Please take a moment to check that your issue doesn't already exist.
1616
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)
1717
5. Please give all relevant information below for bug reports, because

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ modifies/js:
7575
- any-glob-to-any-file:
7676
- "**/*.js"
7777
- "**/*.vue"
78+
79+
docs-update-needed:
80+
- changed-files:
81+
- any-glob-to-any-file:
82+
- "custom/conf/app.example.ini"

.github/workflows/files-changed.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
6464
docs:
6565
- "**/*.md"
66-
- "docs/**"
6766
- ".markdownlint.yaml"
6867
- "package.json"
6968
- "package-lock.json"

.github/workflows/pull-compliance.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ jobs:
191191
cache-dependency-path: package-lock.json
192192
- run: make deps-frontend
193193
- run: make lint-md
194-
- run: make docs
195194

196195
actions:
197196
if: needs.files-changed.outputs.actions == 'true' || needs.files-changed.outputs.actions == 'true'

0 commit comments

Comments
 (0)