Skip to content

Update to eslint 10#36925

Open
silverwind wants to merge 8 commits intogo-gitea:mainfrom
silverwind:eslint10
Open

Update to eslint 10#36925
silverwind wants to merge 8 commits intogo-gitea:mainfrom
silverwind:eslint10

Conversation

@silverwind
Copy link
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
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
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
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.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/dependencies modifies/frontend topic/code-linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants