Skip to content

Commit 0c6d40c

Browse files
committed
Merge branch 'main' of https://github.com/go-gitea/gitea into feature-arch
2 parents 328309f + a32cfb2 commit 0c6d40c

File tree

1,515 files changed

+44459
-53102
lines changed

Some content is hidden

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

1,515 files changed

+44459
-53102
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
77
"version": "20"
88
},
9-
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
9+
"ghcr.io/devcontainers/features/git-lfs:1.2.2": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
1111
"ghcr.io/devcontainers/features/python:1": {
1212
"version": "3.12"

.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: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ plugins:
2727
- "@stylistic/eslint-plugin-js"
2828
- "@typescript-eslint/eslint-plugin"
2929
- eslint-plugin-array-func
30-
- eslint-plugin-deprecation
3130
- eslint-plugin-github
3231
- eslint-plugin-i
3332
- eslint-plugin-no-jquery
@@ -47,7 +46,6 @@ overrides:
4746
- files: ["web_src/**/*"]
4847
globals:
4948
__webpack_public_path__: true
50-
htmx: true
5149
process: false # https://github.com/webpack/webpack/issues/15833
5250
- files: ["web_src/**/*", "docs/**/*"]
5351
env:
@@ -61,7 +59,15 @@ overrides:
6159
- files: ["*.config.*"]
6260
rules:
6361
i/no-unused-modules: [0]
64-
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
62+
- files: ["**/*.d.ts"]
63+
rules:
64+
i/no-unused-modules: [0]
65+
"@typescript-eslint/consistent-type-definitions": [0]
66+
"@typescript-eslint/consistent-type-imports": [0]
67+
- files: ["web_src/js/types.ts"]
68+
rules:
69+
i/no-unused-modules: [0]
70+
- files: ["**/*.test.*", "web_src/js/test/setup.ts"]
6571
env:
6672
vitest-globals/env: true
6773
rules:
@@ -114,7 +120,7 @@ overrides:
114120
vitest/valid-describe-callback: [2]
115121
vitest/valid-expect: [2]
116122
vitest/valid-title: [2]
117-
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
123+
- files: ["web_src/js/modules/fetch.ts", "web_src/js/standalone/**/*"]
118124
rules:
119125
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
120126
- files: ["**/*.vue"]
@@ -217,7 +223,6 @@ rules:
217223
"@typescript-eslint/await-thenable": [2]
218224
"@typescript-eslint/ban-ts-comment": [2, {'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': false, 'ts-check': false}]
219225
"@typescript-eslint/ban-tslint-comment": [0]
220-
"@typescript-eslint/ban-types": [2, {extendDefaults: true, types: {Function: false}}]
221226
"@typescript-eslint/class-literal-property-style": [0]
222227
"@typescript-eslint/class-methods-use-this": [0]
223228
"@typescript-eslint/consistent-generic-constructors": [0]
@@ -242,12 +247,14 @@ rules:
242247
"@typescript-eslint/no-base-to-string": [0]
243248
"@typescript-eslint/no-confusing-non-null-assertion": [2]
244249
"@typescript-eslint/no-confusing-void-expression": [0]
250+
"@typescript-eslint/no-deprecated": [2]
245251
"@typescript-eslint/no-dupe-class-members": [0]
246252
"@typescript-eslint/no-duplicate-enum-values": [2]
247253
"@typescript-eslint/no-duplicate-type-constituents": [2, {ignoreUnions: true}]
248254
"@typescript-eslint/no-dynamic-delete": [0]
249255
"@typescript-eslint/no-empty-function": [0]
250256
"@typescript-eslint/no-empty-interface": [0]
257+
"@typescript-eslint/no-empty-object-type": [2]
251258
"@typescript-eslint/no-explicit-any": [0]
252259
"@typescript-eslint/no-extra-non-null-assertion": [2]
253260
"@typescript-eslint/no-extraneous-class": [0]
@@ -259,7 +266,7 @@ rules:
259266
"@typescript-eslint/no-invalid-this": [0]
260267
"@typescript-eslint/no-invalid-void-type": [0]
261268
"@typescript-eslint/no-loop-func": [0]
262-
"@typescript-eslint/no-loss-of-precision": [2]
269+
"@typescript-eslint/no-loss-of-precision": [0]
263270
"@typescript-eslint/no-magic-numbers": [0]
264271
"@typescript-eslint/no-meaningless-void-operator": [0]
265272
"@typescript-eslint/no-misused-new": [2]
@@ -271,8 +278,9 @@ rules:
271278
"@typescript-eslint/no-non-null-assertion": [0]
272279
"@typescript-eslint/no-redeclare": [0]
273280
"@typescript-eslint/no-redundant-type-constituents": [2]
274-
"@typescript-eslint/no-require-imports": [0]
281+
"@typescript-eslint/no-require-imports": [2]
275282
"@typescript-eslint/no-restricted-imports": [0]
283+
"@typescript-eslint/no-restricted-types": [0]
276284
"@typescript-eslint/no-shadow": [0]
277285
"@typescript-eslint/no-this-alias": [0] # handled by unicorn/no-this-assignment
278286
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [0]
@@ -287,6 +295,7 @@ rules:
287295
"@typescript-eslint/no-unsafe-call": [0]
288296
"@typescript-eslint/no-unsafe-declaration-merging": [2]
289297
"@typescript-eslint/no-unsafe-enum-comparison": [2]
298+
"@typescript-eslint/no-unsafe-function-type": [2]
290299
"@typescript-eslint/no-unsafe-member-access": [0]
291300
"@typescript-eslint/no-unsafe-return": [0]
292301
"@typescript-eslint/no-unsafe-unary-minus": [2]
@@ -295,7 +304,7 @@ rules:
295304
"@typescript-eslint/no-use-before-define": [0]
296305
"@typescript-eslint/no-useless-constructor": [0]
297306
"@typescript-eslint/no-useless-empty-export": [0]
298-
"@typescript-eslint/no-var-requires": [2]
307+
"@typescript-eslint/no-wrapper-object-types": [2]
299308
"@typescript-eslint/non-nullable-type-assertion-style": [0]
300309
"@typescript-eslint/only-throw-error": [2]
301310
"@typescript-eslint/parameter-properties": [0]
@@ -327,7 +336,7 @@ rules:
327336
"@typescript-eslint/switch-exhaustiveness-check": [0]
328337
"@typescript-eslint/triple-slash-reference": [2]
329338
"@typescript-eslint/typedef": [0]
330-
"@typescript-eslint/unbound-method": [2]
339+
"@typescript-eslint/unbound-method": [0] # too many false-positives
331340
"@typescript-eslint/unified-signatures": [2]
332341
accessor-pairs: [2]
333342
array-callback-return: [2, {checkForEach: true}]
@@ -350,7 +359,6 @@ rules:
350359
default-case-last: [2]
351360
default-case: [0]
352361
default-param-last: [0]
353-
deprecation/deprecation: [2]
354362
dot-notation: [0]
355363
eqeqeq: [2]
356364
for-direction: [2]
@@ -467,7 +475,7 @@ rules:
467475
no-dupe-else-if: [2]
468476
no-dupe-keys: [2]
469477
no-duplicate-case: [2]
470-
no-duplicate-imports: [2]
478+
no-duplicate-imports: [0]
471479
no-else-return: [2]
472480
no-empty-character-class: [2]
473481
no-empty-function: [0]
@@ -505,7 +513,7 @@ rules:
505513
no-jquery/no-box-model: [2]
506514
no-jquery/no-browser: [2]
507515
no-jquery/no-camel-case: [2]
508-
no-jquery/no-class-state: [0]
516+
no-jquery/no-class-state: [2]
509517
no-jquery/no-class: [0]
510518
no-jquery/no-clone: [2]
511519
no-jquery/no-closest: [0]
@@ -561,7 +569,7 @@ rules:
561569
no-jquery/no-param: [2]
562570
no-jquery/no-parent: [0]
563571
no-jquery/no-parents: [2]
564-
no-jquery/no-parse-html-literal: [0]
572+
no-jquery/no-parse-html-literal: [2]
565573
no-jquery/no-parse-html: [2]
566574
no-jquery/no-parse-json: [2]
567575
no-jquery/no-parse-xml: [2]
@@ -592,7 +600,7 @@ rules:
592600
no-lone-blocks: [2]
593601
no-lonely-if: [0]
594602
no-loop-func: [0]
595-
no-loss-of-precision: [0] # handled by @typescript-eslint/no-loss-of-precision
603+
no-loss-of-precision: [2]
596604
no-magic-numbers: [0]
597605
no-misleading-character-class: [2]
598606
no-multi-assign: [0]
@@ -619,7 +627,7 @@ rules:
619627
no-restricted-exports: [0]
620628
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]
621629
no-restricted-imports: [0]
622-
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
630+
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.ts instead"}]
623631
no-return-assign: [0]
624632
no-script-url: [2]
625633
no-self-assign: [2, {props: true}]
@@ -634,7 +642,7 @@ rules:
634642
no-this-before-super: [2]
635643
no-throw-literal: [2]
636644
no-undef-init: [2]
637-
no-undef: [2, {typeof: true}]
645+
no-undef: [2, {typeof: true}] # TODO: disable this rule after tsc passes
638646
no-undefined: [0]
639647
no-underscore-dangle: [0]
640648
no-unexpected-multiline: [2]
@@ -807,6 +815,7 @@ rules:
807815
unicorn/catch-error-name: [0]
808816
unicorn/consistent-destructuring: [2]
809817
unicorn/consistent-empty-array-spread: [2]
818+
unicorn/consistent-existence-index-check: [0]
810819
unicorn/consistent-function-scoping: [2]
811820
unicorn/custom-error-definition: [0]
812821
unicorn/empty-brace-spaces: [2]
@@ -836,6 +845,7 @@ rules:
836845
unicorn/no-invalid-fetch-options: [2]
837846
unicorn/no-invalid-remove-event-listener: [2]
838847
unicorn/no-keyword-prefix: [0]
848+
unicorn/no-length-as-slice-end: [2]
839849
unicorn/no-lonely-if: [2]
840850
unicorn/no-magic-array-flat-depth: [0]
841851
unicorn/no-negated-condition: [0]
@@ -882,10 +892,12 @@ rules:
882892
unicorn/prefer-dom-node-text-content: [2]
883893
unicorn/prefer-event-target: [2]
884894
unicorn/prefer-export-from: [0]
895+
unicorn/prefer-global-this: [0]
885896
unicorn/prefer-includes: [2]
886897
unicorn/prefer-json-parse-buffer: [0]
887898
unicorn/prefer-keyboard-event-key: [2]
888899
unicorn/prefer-logical-operator-over-ternary: [2]
900+
unicorn/prefer-math-min-max: [2]
889901
unicorn/prefer-math-trunc: [2]
890902
unicorn/prefer-modern-dom-apis: [0]
891903
unicorn/prefer-modern-math-apis: [2]

.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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@ modifies/go:
7070
- any-glob-to-any-file:
7171
- "**/*.go"
7272

73-
modifies/js:
73+
modifies/frontend:
7474
- changed-files:
7575
- any-glob-to-any-file:
7676
- "**/*.js"
77+
- "**/*.ts"
7778
- "**/*.vue"
79+
80+
docs-update-needed:
81+
- changed-files:
82+
- any-glob-to-any-file:
83+
- "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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python-version: "3.12"
3838
- uses: actions/setup-node@v4
3939
with:
40-
node-version: 20
40+
node-version: 22
4141
cache: npm
4242
cache-dependency-path: package-lock.json
4343
- run: pip install poetry
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/checkout@v4
6767
- uses: actions/setup-node@v4
6868
with:
69-
node-version: 20
69+
node-version: 22
7070
cache: npm
7171
cache-dependency-path: package-lock.json
7272
- run: make deps-frontend
@@ -137,7 +137,7 @@ jobs:
137137
- uses: actions/checkout@v4
138138
- uses: actions/setup-node@v4
139139
with:
140-
node-version: 20
140+
node-version: 22
141141
cache: npm
142142
cache-dependency-path: package-lock.json
143143
- run: make deps-frontend
@@ -186,12 +186,11 @@ jobs:
186186
- uses: actions/checkout@v4
187187
- uses: actions/setup-node@v4
188188
with:
189-
node-version: 20
189+
node-version: 22
190190
cache: npm
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)