Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Dec 13, 2025

  • Update all JS deps
  • Tested affected dependencies
  • Replace eslint unstable_native_nodejs_ts_config with optional jiti dependency. This will be more compatible with editor integrations that may not pass this flag.
  • Enable @typescript-eslint/array-type and autofix issues
  • Enable @typescript-eslint/no-useless-default-assignment and fix 1 issue. disabled again, false positive.
  • Enable additional eslint rules, no new issues
  • Move typescript to devDependencies because make frontend works without it

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 13, 2025
@silverwind silverwind changed the title Update JS deps and misc tweaks Update JS deps and eslint enhancements Dec 13, 2025
@lunny
Copy link
Member

lunny commented Dec 13, 2025

It seems string[] looks more better than Array<string> in most situation.

@silverwind
Copy link
Member Author

silverwind commented Dec 14, 2025

For simple types maybe but once they get complex, generic form is superior, e.g. Array<Foo | Bar> is more readable than (Foo | Bar)[]. And once you start using generic syntax, you question why there are two syntax variants in use so I just like to default to one syntax. There is a array-simple option too but I find it unsuitable because I don't want to forbid generic syntax for simple types.

It's not a big issue for me, if people prefer the [] (maybe because they come from go), we can continue to allow both syntaxes. I will only be writing generic syntax though.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 14, 2025
* origin/main:
  fix webAuthn insecure error view (go-gitea#36165)
  Some small refactors (go-gitea#36163)
  Remove undocumented support of signing key in the repository git configuration file (go-gitea#36143)
  Enable gocheckcompilerdirectives linter (go-gitea#36156)
  Fix code highlighting on blame page (go-gitea#36157)
  Check user visibility when redirecting to a renamed user (go-gitea#36148)
  Fix bug when viewing the commit diff page with non-ANSI files (go-gitea#36149)
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Dec 17, 2025

It's not a big issue for me, if people prefer the [] (maybe because they come from go), we can continue to allow both syntaxes. I will only be writing generic syntax though.

I also prefer string[] when the type is simple. Not only Go, but also PHP, Java, C/C++, C#, etc

@silverwind
Copy link
Member Author

silverwind commented Dec 17, 2025

I guess then we need to disable the lint rule because the option array-simple is too strict as it forces simple types to always use [], while we then would want it to accept both variants for simple types at least.

@silverwind
Copy link
Member Author

BTW here are more arguments why the generic syntax is superior: https://tkdodo.eu/blog/array-types-in-type-script

@silverwind
Copy link
Member Author

Reverted the array type changes and updated dependencies again, should be ready now.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 17, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) December 17, 2025 17:26
@wxiaoguang wxiaoguang merged commit ad49b7b into go-gitea:main Dec 17, 2025
23 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Dec 17, 2025
@silverwind silverwind deleted the deps-105 branch December 17, 2025 18:10
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 19, 2025
* giteaofficial/main:
  Add JSON linting (go-gitea#36192)
  Bump setup-node to v6, re-enable cache (go-gitea#36207)
  [skip ci] Updated translations via Crowdin
  Update chroma to v2.21.1 (go-gitea#36201)
  Disable dependabot automatic labels (go-gitea#36203)
  Bump astral-sh/setup-uv from 6 to 7 (go-gitea#36198)
  Front port changelog (go-gitea#36193)
  Bump dev-hanz-ops/install-gh-cli-action from 0.1.0 to 0.2.1 (go-gitea#36195)
  Bump aws-actions/configure-aws-credentials from 4 to 5 (go-gitea#36196)
  Bump docker/build-push-action from 5 to 6 (go-gitea#36197)
  Enable dependabot for actions (go-gitea#36191)
  Bump alpine to 3.23 (go-gitea#36185)
  Use gitRepo as parameter instead of repopath when invoking sign functions (go-gitea#36162)
  Fix bug when creating pull request (go-gitea#36166)
  Bump golangci-lint to 2.7.2, enable modernize stringsbuilder (go-gitea#36180)
  Use a migration test instead of a wrong test which populated the meta test repositories and fix a migration bug (go-gitea#36160)
  Update JS deps and eslint enhancements (go-gitea#36147)
  Add git.DIFF_RENAME_SIMILARITY_THRESHOLD option (go-gitea#36164)
  Fix OrgAssignment opts (go-gitea#36174)

# Conflicts:
#	models/user/user.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/frontend modifies/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants