Skip to content

Enable Typescript strictFunctionTypes #32911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 21, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Dec 19, 2024

  1. Enable strictFunctionTypes
  2. Introduce DOMEvent helper type which sets e.target. Surely not totally correct with that Partial but seems to work.
  3. Various type-related refactors, change objects in eventsource.sharedworker.ts to Map.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 19, 2024
@silverwind silverwind added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Dec 19, 2024
@silverwind
Copy link
Member Author

silverwind commented Dec 19, 2024

There is some weird deprecation showing up on jQuery .on:

/home/runner/work/gitea/gitea/web_src/js/features/repo-settings.ts
  125:25  error  `on` is deprecated. Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`  @typescript-eslint/no-deprecated
  134:31  error  `on` is deprecated. Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`  @typescript-eslint/no-deprecated

I have no idea how to resolve, will disable the lint for now, to be refactored without jQuery later.

@silverwind silverwind changed the title Enable typescript strictFunctionTypes Enable Typescript strictFunctionTypes Dec 19, 2024
@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 20, 2024
@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 20, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 21, 2024
@lunny lunny merged commit c0e80db into go-gitea:main Dec 21, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Dec 21, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 21, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 23, 2024
* giteaofficial/main: (62 commits)
  Fix repo avatar conflict (go-gitea#32958)
  [skip ci] Updated licenses and gitignores
  fix trailing comma not matched in the case of alphanumeric issue (go-gitea#32945)
  Add auto-expanding running actions step (go-gitea#30058)
  Fix go-gitea#32954 (go-gitea#32955)
  Use Alpine 3.21 for the docker images (go-gitea#32924)
  Refactor template & test related code (go-gitea#32938)
  Use primary as button color (go-gitea#32949)
  [skip ci] Updated translations via Crowdin
  Add action auto-scroll (go-gitea#30057)
  Fix locale (go-gitea#32937)
  Enable Typescript `strictFunctionTypes` (go-gitea#32911)
  Fix areYouSure confirm (go-gitea#32941)
  Update i18n.go - Language Picker (go-gitea#32933)
  Move some errors to their own sub packages (go-gitea#32880)
  Improve navbar: add "admin" tip, add "active" style (go-gitea#32927)
  Refactor db package and remove unnecessary `DumpTables` (go-gitea#32930)
  show warning on navigation if currently editing comment or title (go-gitea#32920)
  Refactor pprof labels and process desc (go-gitea#32909)
  [skip ci] Updated translations via Crowdin
  ...
@silverwind silverwind deleted the strictFunctionTypes branch January 13, 2025 14:17
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants