Skip to content

Update to eslint 10#36925

Merged
silverwind merged 11 commits into
go-gitea:mainfrom
silverwind:eslint10
Mar 23, 2026
Merged

Update to eslint 10#36925
silverwind merged 11 commits into
go-gitea:mainfrom
silverwind:eslint10

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 18, 2026

  • Enable a few more rules, fix issues. The 2 value issues are false-positives.
  • Add exact types for window.pageData and window.notificationSettings.
  • peerDependencyRules for eslint-plugin-github unrestricted, the plugin works in v10, but does not declare compatibility, pending Support ESLint v10 github/eslint-plugin-github#680.
  • Added eslint-plugin-de-morgan, no violations.

- Enable a few more rules, fix issues
- peerDependencyRules for eslint-plugin-github unrestricted, the plugin
  works in v10, but does not declare compatibility.
- Added eslint-plugin-de-morgan, no violations.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 18, 2026
Comment thread eslint.config.ts Outdated
Not needed, was in my personal config for react reasons.

Signed-off-by: silverwind <me@silverwind.io>
@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 Mar 19, 2026
silverwind and others added 3 commits March 19, 2026 01:37
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind
Copy link
Copy Markdown
Member Author

pageData is now fully type-safe. It nececessiated a few more changes, mostly in DashboardRepoList. All affected pages were tested.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind requested a review from Copilot March 19, 2026 09:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the linting/tooling stack to ESLint v10 and adjusts web TS/Vue code to satisfy newly enabled rules while tightening global window.config typing.

Changes:

  • Bump ESLint to v10 and refresh related eslint/* plugins; add eslint-plugin-de-morgan and pnpm peer dependency rule override.
  • Tighten window.config.pageData / window.config.notificationSettings typings and update call sites accordingly.
  • Fix newly surfaced lint issues (catch clause typing, string conversions, DOM API typing).

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
web_src/js/vitest.setup.ts Updates test window config to match stricter notificationSettings typing
web_src/js/utils.ts Normalizes caught errors to Error objects for promise rejections
web_src/js/modules/diff-file.ts Exports DiffFileTreeData and applies non-null assertions for pageData
web_src/js/globals.d.ts Adds explicit typing for pageData fields and notificationSettings
web_src/js/features/repo-search.ts Adjusts FormData handling to satisfy stricter lint/type rules
web_src/js/features/pull-view-file.ts Tightens prReview typing and ensures string conversions in DOM operations
web_src/js/features/common-fetch-action.ts Adjusts query param building with FormData values
web_src/js/features/citation.ts Tightens citation file content typing
web_src/js/components/RepoRecentCommits.vue Marks repoLink as required at usage sites
web_src/js/components/RepoCodeFrequency.vue Marks repoLink as required at usage sites
web_src/js/components/PullRequestMergeForm.vue Marks merge form page data as required at usage sites
web_src/js/components/DashboardRepoList.vue Adds richer TS types for repo list data and ref handling
updates.config.ts Removes excludes now that ESLint 10 migration is done
package.json Upgrades eslint/tooling deps and adds pnpm peerDependencyRules override
eslint.config.ts Enables additional rules and configures new plugin rules
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread web_src/js/features/pull-view-file.ts
Comment thread web_src/js/features/repo-search.ts
Comment thread web_src/js/features/common-fetch-action.ts
Comment thread web_src/js/components/DashboardRepoList.vue Outdated
Comment thread eslint.config.ts
Comment thread eslint.config.ts
Comment thread web_src/js/utils.ts
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@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 Mar 21, 2026
Comment thread web_src/js/features/pull-view-file.ts
wxiaoguang and others added 2 commits March 21, 2026 20:50
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2026
@silverwind silverwind enabled auto-merge (squash) March 23, 2026 07:47
@silverwind silverwind merged commit ae0bc02 into go-gitea:main Mar 23, 2026
26 checks passed
@silverwind silverwind deleted the eslint10 branch March 23, 2026 07:49
@GiteaBot GiteaBot added this to the 1.26.0 milestone Mar 23, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2026
silverwind added a commit to silverwind/gitea that referenced this pull request Mar 23, 2026
* origin/main:
  Update to eslint 10 (go-gitea#36925)
  Add user badges (go-gitea#36752)
  Apply as maintainer (go-gitea#36947)
  Refactor storage content-type handling of ServeDirectURL (go-gitea#36804)
  Add summary to action runs view (go-gitea#36883)
  feat: Add configurable permissions for Actions automatic tokens (go-gitea#36173)
  Feature: Add button to re-run failed jobs in Actions (go-gitea#36924)
  Support dark/light theme images in markdown (go-gitea#36922)
  fix go-gitea#36463: preserve sort order of exclusive labels from template repo (go-gitea#36931)
  fix(upgrade.sh): use HTTPS for GPG key import and restore SELinux context after upgrade (go-gitea#36930)
  [skip ci] Updated translations via Crowdin
  Make container registry support Apple Container (basic auth) (go-gitea#36920)
  Fix various trivial problems (go-gitea#36921)
  [skip ci] Updated translations via Crowdin

# Conflicts:
#	package.json
#	pnpm-lock.yaml
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 24, 2026
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Make PUBLIC_URL_DETECTION default to "auto" (go-gitea#36955)
  Fix user settings sidebar showing disabled features on some pages (go-gitea#36958)
  Update GitHub Actions to latest major versions (go-gitea#36964)
  Fix various trivial problems (go-gitea#36953)
  Rework checkbox styling, remove `input` border hover effect (go-gitea#36870)
  Add `DEFAULT_DELETE_BRANCH_AFTER_MERGE` setting (go-gitea#36917)
  Update Nix flake (go-gitea#36943)
  Update to eslint 10 (go-gitea#36925)
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. topic/code-linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants