Skip to content

Commit ccb9705

Browse files
committed
Merge branch 'refs/heads/main' into fix/new-file-space
2 parents 3d19281 + 03c8c26 commit ccb9705

File tree

551 files changed

+5016
-29871
lines changed

Some content is hidden

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

551 files changed

+5016
-29871
lines changed

.eslintrc.yaml

Lines changed: 140 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ parserOptions:
1313
ecmaVersion: latest
1414
project: true
1515
extraFileExtensions: [".vue"]
16+
parser: "@typescript-eslint/parser" # for vue plugin - https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
1617

1718
settings:
1819
import/extensions: [".js", ".ts"]
@@ -24,7 +25,9 @@ settings:
2425
plugins:
2526
- "@eslint-community/eslint-plugin-eslint-comments"
2627
- "@stylistic/eslint-plugin-js"
28+
- "@typescript-eslint/eslint-plugin"
2729
- eslint-plugin-array-func
30+
- eslint-plugin-deprecation
2831
- eslint-plugin-github
2932
- eslint-plugin-i
3033
- eslint-plugin-no-jquery
@@ -44,7 +47,6 @@ overrides:
4447
- files: ["web_src/**/*"]
4548
globals:
4649
__webpack_public_path__: true
47-
htmx: true
4850
process: false # https://github.com/webpack/webpack/issues/15833
4951
- files: ["web_src/**/*", "docs/**/*"]
5052
env:
@@ -58,7 +60,15 @@ overrides:
5860
- files: ["*.config.*"]
5961
rules:
6062
i/no-unused-modules: [0]
61-
- 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"]
6272
env:
6373
vitest-globals/env: true
6474
rules:
@@ -111,7 +121,7 @@ overrides:
111121
vitest/valid-describe-callback: [2]
112122
vitest/valid-expect: [2]
113123
vitest/valid-title: [2]
114-
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
124+
- files: ["web_src/js/modules/fetch.ts", "web_src/js/standalone/**/*"]
115125
rules:
116126
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
117127
- files: ["**/*.vue"]
@@ -209,6 +219,123 @@ rules:
209219
"@stylistic/js/wrap-iife": [2, inside]
210220
"@stylistic/js/wrap-regex": [0]
211221
"@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/ban-types": [2, {extendDefaults: true, types: {Function: false}}]
228+
"@typescript-eslint/class-literal-property-style": [0]
229+
"@typescript-eslint/class-methods-use-this": [0]
230+
"@typescript-eslint/consistent-generic-constructors": [0]
231+
"@typescript-eslint/consistent-indexed-object-style": [0]
232+
"@typescript-eslint/consistent-return": [0]
233+
"@typescript-eslint/consistent-type-assertions": [2, {assertionStyle: as, objectLiteralTypeAssertions: allow}]
234+
"@typescript-eslint/consistent-type-definitions": [2, type]
235+
"@typescript-eslint/consistent-type-exports": [2, {fixMixedExportsWithInlineTypeSpecifier: false}]
236+
"@typescript-eslint/consistent-type-imports": [2, {prefer: type-imports, fixStyle: separate-type-imports, disallowTypeAnnotations: true}]
237+
"@typescript-eslint/default-param-last": [0]
238+
"@typescript-eslint/dot-notation": [0]
239+
"@typescript-eslint/explicit-function-return-type": [0]
240+
"@typescript-eslint/explicit-member-accessibility": [0]
241+
"@typescript-eslint/explicit-module-boundary-types": [0]
242+
"@typescript-eslint/init-declarations": [0]
243+
"@typescript-eslint/max-params": [0]
244+
"@typescript-eslint/member-ordering": [0]
245+
"@typescript-eslint/method-signature-style": [0]
246+
"@typescript-eslint/naming-convention": [0]
247+
"@typescript-eslint/no-array-constructor": [2]
248+
"@typescript-eslint/no-array-delete": [2]
249+
"@typescript-eslint/no-base-to-string": [0]
250+
"@typescript-eslint/no-confusing-non-null-assertion": [2]
251+
"@typescript-eslint/no-confusing-void-expression": [0]
252+
"@typescript-eslint/no-dupe-class-members": [0]
253+
"@typescript-eslint/no-duplicate-enum-values": [2]
254+
"@typescript-eslint/no-duplicate-type-constituents": [2, {ignoreUnions: true}]
255+
"@typescript-eslint/no-dynamic-delete": [0]
256+
"@typescript-eslint/no-empty-function": [0]
257+
"@typescript-eslint/no-empty-interface": [0]
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": [2]
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": [0]
282+
"@typescript-eslint/no-restricted-imports": [0]
283+
"@typescript-eslint/no-shadow": [0]
284+
"@typescript-eslint/no-this-alias": [0] # handled by unicorn/no-this-assignment
285+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [0]
286+
"@typescript-eslint/no-unnecessary-condition": [0]
287+
"@typescript-eslint/no-unnecessary-qualifier": [0]
288+
"@typescript-eslint/no-unnecessary-template-expression": [0]
289+
"@typescript-eslint/no-unnecessary-type-arguments": [0]
290+
"@typescript-eslint/no-unnecessary-type-assertion": [2]
291+
"@typescript-eslint/no-unnecessary-type-constraint": [2]
292+
"@typescript-eslint/no-unsafe-argument": [0]
293+
"@typescript-eslint/no-unsafe-assignment": [0]
294+
"@typescript-eslint/no-unsafe-call": [0]
295+
"@typescript-eslint/no-unsafe-declaration-merging": [2]
296+
"@typescript-eslint/no-unsafe-enum-comparison": [2]
297+
"@typescript-eslint/no-unsafe-member-access": [0]
298+
"@typescript-eslint/no-unsafe-return": [0]
299+
"@typescript-eslint/no-unsafe-unary-minus": [2]
300+
"@typescript-eslint/no-unused-expressions": [0]
301+
"@typescript-eslint/no-unused-vars": [2, {vars: all, args: all, caughtErrors: all, ignoreRestSiblings: false, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_}]
302+
"@typescript-eslint/no-use-before-define": [0]
303+
"@typescript-eslint/no-useless-constructor": [0]
304+
"@typescript-eslint/no-useless-empty-export": [0]
305+
"@typescript-eslint/no-var-requires": [2]
306+
"@typescript-eslint/non-nullable-type-assertion-style": [0]
307+
"@typescript-eslint/only-throw-error": [2]
308+
"@typescript-eslint/parameter-properties": [0]
309+
"@typescript-eslint/prefer-as-const": [2]
310+
"@typescript-eslint/prefer-destructuring": [0]
311+
"@typescript-eslint/prefer-enum-initializers": [0]
312+
"@typescript-eslint/prefer-find": [2]
313+
"@typescript-eslint/prefer-for-of": [2]
314+
"@typescript-eslint/prefer-function-type": [2]
315+
"@typescript-eslint/prefer-includes": [2]
316+
"@typescript-eslint/prefer-literal-enum-member": [0]
317+
"@typescript-eslint/prefer-namespace-keyword": [0]
318+
"@typescript-eslint/prefer-nullish-coalescing": [0]
319+
"@typescript-eslint/prefer-optional-chain": [2, {requireNullish: true}]
320+
"@typescript-eslint/prefer-promise-reject-errors": [0]
321+
"@typescript-eslint/prefer-readonly": [0]
322+
"@typescript-eslint/prefer-readonly-parameter-types": [0]
323+
"@typescript-eslint/prefer-reduce-type-parameter": [0]
324+
"@typescript-eslint/prefer-regexp-exec": [0]
325+
"@typescript-eslint/prefer-return-this-type": [0]
326+
"@typescript-eslint/prefer-string-starts-ends-with": [2, {allowSingleElementEquality: always}]
327+
"@typescript-eslint/promise-function-async": [0]
328+
"@typescript-eslint/require-array-sort-compare": [0]
329+
"@typescript-eslint/require-await": [0]
330+
"@typescript-eslint/restrict-plus-operands": [2]
331+
"@typescript-eslint/restrict-template-expressions": [0]
332+
"@typescript-eslint/return-await": [0]
333+
"@typescript-eslint/strict-boolean-expressions": [0]
334+
"@typescript-eslint/switch-exhaustiveness-check": [0]
335+
"@typescript-eslint/triple-slash-reference": [2]
336+
"@typescript-eslint/typedef": [0]
337+
"@typescript-eslint/unbound-method": [2]
338+
"@typescript-eslint/unified-signatures": [2]
212339
accessor-pairs: [2]
213340
array-callback-return: [2, {checkForEach: true}]
214341
array-func/avoid-reverse: [2]
@@ -230,6 +357,7 @@ rules:
230357
default-case-last: [2]
231358
default-case: [0]
232359
default-param-last: [0]
360+
deprecation/deprecation: [2]
233361
dot-notation: [0]
234362
eqeqeq: [2]
235363
for-direction: [2]
@@ -321,7 +449,7 @@ rules:
321449
multiline-comment-style: [2, separate-lines]
322450
new-cap: [0]
323451
no-alert: [0]
324-
no-array-constructor: [2]
452+
no-array-constructor: [0] # handled by @typescript-eslint/no-array-constructor
325453
no-async-promise-executor: [0]
326454
no-await-in-loop: [0]
327455
no-bitwise: [0]
@@ -346,7 +474,7 @@ rules:
346474
no-dupe-else-if: [2]
347475
no-dupe-keys: [2]
348476
no-duplicate-case: [2]
349-
no-duplicate-imports: [2]
477+
no-duplicate-imports: [0]
350478
no-else-return: [2]
351479
no-empty-character-class: [2]
352480
no-empty-function: [0]
@@ -365,7 +493,7 @@ rules:
365493
no-global-assign: [2]
366494
no-implicit-coercion: [2]
367495
no-implicit-globals: [0]
368-
no-implied-eval: [2]
496+
no-implied-eval: [0] # handled by @typescript-eslint/no-implied-eval
369497
no-import-assign: [2]
370498
no-inline-comments: [0]
371499
no-inner-declarations: [2]
@@ -384,7 +512,7 @@ rules:
384512
no-jquery/no-box-model: [2]
385513
no-jquery/no-browser: [2]
386514
no-jquery/no-camel-case: [2]
387-
no-jquery/no-class-state: [0]
515+
no-jquery/no-class-state: [2]
388516
no-jquery/no-class: [0]
389517
no-jquery/no-clone: [2]
390518
no-jquery/no-closest: [0]
@@ -471,7 +599,7 @@ rules:
471599
no-lone-blocks: [2]
472600
no-lonely-if: [0]
473601
no-loop-func: [0]
474-
no-loss-of-precision: [2]
602+
no-loss-of-precision: [0] # handled by @typescript-eslint/no-loss-of-precision
475603
no-magic-numbers: [0]
476604
no-misleading-character-class: [2]
477605
no-multi-assign: [0]
@@ -493,12 +621,12 @@ rules:
493621
no-promise-executor-return: [0]
494622
no-proto: [2]
495623
no-prototype-builtins: [2]
496-
no-redeclare: [2]
624+
no-redeclare: [0] # must be disabled for typescript overloads
497625
no-regex-spaces: [2]
498626
no-restricted-exports: [0]
499627
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]
500628
no-restricted-imports: [0]
501-
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
629+
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.ts instead"}]
502630
no-return-assign: [0]
503631
no-script-url: [2]
504632
no-self-assign: [2, {props: true}]
@@ -526,7 +654,7 @@ rules:
526654
no-unused-expressions: [2]
527655
no-unused-labels: [2]
528656
no-unused-private-class-members: [2]
529-
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
657+
no-unused-vars: [0] # handled by @typescript-eslint/no-unused-vars
530658
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
531659
no-use-extend-native/no-use-extend-native: [2]
532660
no-useless-backreference: [2]
@@ -641,7 +769,7 @@ rules:
641769
regexp/unicode-escape: [0]
642770
regexp/use-ignore-case: [0]
643771
require-atomic-updates: [0]
644-
require-await: [0]
772+
require-await: [0] # handled by @typescript-eslint/require-await
645773
require-unicode-regexp: [0]
646774
require-yield: [2]
647775
sonarjs/cognitive-complexity: [0]

.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'

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ Gary Wang <[email protected]> (@BLumia)
6262
Tim-Niclas Oelschläger <[email protected]> (@zokkis)
6363
Yu Liu <[email protected]> (@HEREYUA)
6464
Kemal Zebari <[email protected]> (@kemzeb)
65+
Rowan Bohde <[email protected]> (@bohde)

Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
144144
GO_DIRS := build cmd models modules routers services tests
145145
WEB_DIRS := web_src/js web_src/css
146146

147-
ESLINT_FILES := web_src/js tools *.js tests/e2e
147+
ESLINT_FILES := web_src/js tools *.js *.ts tests/e2e
148148
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
149-
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.js *.md *.yml *.yaml *.toml))
149+
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.js *.md *.yml *.yaml *.toml))
150150
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
151151

152152
GO_SOURCES := $(wildcard *.go)
@@ -376,12 +376,12 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
376376
.PHONY: lint-js
377377
lint-js: node_modules
378378
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
379-
npx tsc
379+
# npx tsc
380380

381381
.PHONY: lint-js-fix
382382
lint-js-fix: node_modules
383383
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
384-
npx tsc
384+
# npx tsc
385385

386386
.PHONY: lint-css
387387
lint-css: node_modules
@@ -397,7 +397,7 @@ lint-swagger: node_modules
397397

398398
.PHONY: lint-md
399399
lint-md: node_modules
400-
npx markdownlint docs *.md
400+
npx markdownlint *.md
401401

402402
.PHONY: lint-spell
403403
lint-spell:
@@ -797,7 +797,7 @@ $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
797797
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
798798

799799
.PHONY: release
800-
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-docs release-check
800+
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-check
801801

802802
$(DIST_DIRS):
803803
mkdir -p $(DIST_DIRS)
@@ -843,10 +843,6 @@ release-sources: | $(DIST_DIRS)
843843
tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) $(TRANSFORM) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
844844
rm -f $(STORED_VERSION_FILE)
845845

846-
.PHONY: release-docs
847-
release-docs: | $(DIST_DIRS) docs
848-
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
849-
850846
.PHONY: deps
851847
deps: deps-frontend deps-backend deps-tools deps-py
852848

0 commit comments

Comments
 (0)