Skip to content

chore: rm eslint-disable#728

Merged
li-jia-nan merged 3 commits intomasterfrom
eslint-disable
Feb 8, 2026
Merged

chore: rm eslint-disable#728
li-jia-nan merged 3 commits intomasterfrom
eslint-disable

Conversation

@li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Feb 8, 2026

Summary by CodeRabbit

发布说明

  • Chores

    • 更新ESLint及相关插件至最新版本,以改进代码质量检查
  • Refactor

    • 优化内部代码结构,提升代码可维护性

注: 本次更新为内部改进,不涉及用户可见的功能变更。

Copilot AI review requested due to automatic review settings February 8, 2026 14:02
@vercel
Copy link

vercel bot commented Feb 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
util Ready Ready Preview, Comment Feb 8, 2026 2:19pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @li-jia-nan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on maintenance and code quality improvements by updating core ESLint dependencies to their latest major versions. It also cleans up eslint-disable directives in the useEvent hook, suggesting that the underlying issues might have been resolved or are no longer relevant with the updated linting rules. Additionally, the useEvent hook has been refactored to use an arrow function syntax for consistency.

Highlights

  • Dependency Updates: Updated eslint from ^8.54.0 to ^10.0.0, eslint-plugin-jest from ^29.0.1 to ^29.12.2, and eslint-plugin-unicorn from ^56.0.1 to ^62.0.0 in package.json.
  • Code Cleanup: Removed /* eslint-disable @typescript-eslint/ban-types */ and /* eslint-disable react-hooks/exhaustive-deps */ comments from src/hooks/useEvent.ts.
  • Code Style Refinement: Converted the useEvent function declaration in src/hooks/useEvent.ts from a traditional function keyword to a const arrow function.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • package.json
    • Updated eslint dependency from ^8.54.0 to ^10.0.0.
    • Updated eslint-plugin-jest dependency from ^29.0.1 to ^29.12.2.
    • Updated eslint-plugin-unicorn dependency from ^56.0.1 to ^62.0.0.
  • src/hooks/useEvent.ts
    • Removed eslint-disable comments for @typescript-eslint/ban-types and react-hooks/exhaustive-deps.
    • Refactored the useEvent function from a function declaration to a const arrow function.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

总览

更新了ESLint相关的开发依赖至更新的主/次版本,并将useEvent钩子从函数声明改写为箭头函数形式,移除了相关的ESLint禁用注释。

变更

变更组 / 文件 摘要
依赖版本更新
package.json
更新ESLint相关开发依赖:eslint升级至^10.0.0、eslint-plugin-jest升级至^29.12.2、eslint-plugin-unicorn升级至^62.0.0。
钩子函数重构
src/hooks/useEvent.ts
将useEvent从函数声明改为const箭头函数,更新返回类型注解,移除内联ESLint禁用注释,保留原有的泛型签名和逻辑。

预估代码审查工作量

🎯 2 (Simple) | ⏱️ ~12 分钟

可能相关的PR

诗歌

🐰 ESLint升级新版本,
箭头函数更优雅,
代码重构显精致,
禁用注释已移除,
兔子欢呼新气象!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Pull request title 'chore: rm eslint-disable' accurately describes removing ESLint disable comments, which is a significant part of the changes in useEvent.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch eslint-disable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Feb 8, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates ESLint and related plugins, and removes some eslint-disable comments. The change in src/hooks/useEvent.ts from a function declaration to a const arrow function is fine, but it reveals a pre-existing type safety issue in the useEvent hook's return type. The declared return type is not consistent with the implementation, which can lead to runtime errors not caught by the type checker. I've added a comment with a suggestion to fix this.

Copy link

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

Removes file-level ESLint disable directives from the useEvent hook and updates the lint toolchain dependencies, aiming to keep the codebase lint-clean without blanket suppressions.

Changes:

  • Removed eslint-disable directives in src/hooks/useEvent.ts and refactored the hook declaration to a const arrow function.
  • Upgraded eslint, eslint-plugin-jest, and eslint-plugin-unicorn versions in package.json.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/hooks/useEvent.ts Removes file-level lint suppressions and adjusts the hook declaration style.
package.json Updates ESLint and related plugins to newer versions.

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 58-60: Package.json was upgraded to eslint v10 which requires flat
config; migrate the legacy .eslintrc.js to a new flat config file by creating
eslint.config.js, porting all rule sets, parser options, plugins and overrides
from .eslintrc.js into the flat-config format (exporting an array or config
object as required), and ensure the project's "lint" npm script (the CLI
invocation with any --ext flags) continues to point to the same files so ESLint
v10 can load the new eslint.config.js; update any plugin import names or plugin
setups in the new file to the flat-config-compatible forms and validate the
config by running the lint script.

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.20%. Comparing base (920d216) to head (1fa1921).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   86.19%   86.20%   +0.01%     
==========================================
  Files          38       38              
  Lines        1043     1044       +1     
  Branches      370      385      +15     
==========================================
+ Hits          899      900       +1     
  Misses        142      142              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@li-jia-nan li-jia-nan merged commit f07e0d6 into master Feb 8, 2026
12 checks passed
@li-jia-nan li-jia-nan deleted the eslint-disable branch February 8, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant