Conversation
fengmk2
commented
Mar 8, 2026
- Upgrade eslint from ^8.23.1 to ^9.39.4
- Upgrade eslint-config-egg from ^12.0.0 to ^14.1.0
- Add @eslint/compat, @eslint/eslintrc, @eslint/js, globals
- Replace .eslintrc and .eslintignore with eslint.config.mjs (flat config)
- Use FlatCompat + fixupConfigRules for legacy eslint-config-egg compatibility
- Add node: prefix to all built-in module requires (eslint-config-egg v14)
- Replace unused catch variables with empty catch clauses (ESLint v9)
- Remove duplicate eslint config comment in lib/egg.js
- Upgrade eslint from ^8.23.1 to ^9.39.4 - Upgrade eslint-config-egg from ^12.0.0 to ^14.1.0 - Add @eslint/compat, @eslint/eslintrc, @eslint/js, globals - Replace .eslintrc and .eslintignore with eslint.config.mjs (flat config) - Use FlatCompat + fixupConfigRules for legacy eslint-config-egg compatibility - Add node: prefix to all built-in module requires (eslint-config-egg v14) - Replace unused catch variables with empty catch clauses (ESLint v9) - Remove duplicate eslint config comment in lib/egg.js
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello, 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 significantly modernizes the project's linting infrastructure by upgrading ESLint to its latest major version (v9) and migrating to its new flat configuration system. This change streamlines the ESLint setup, improves maintainability, and ensures compatibility with current best practices. Additionally, it standardizes Node.js built-in module imports with the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request migrates the project from ESLint v8 to the new ESLint v9 with its flat configuration. The changes include updating dependencies, replacing .eslintrc with eslint.config.mjs, adding the node: prefix to all built-in module imports, and removing unused variables in catch blocks. The migration is well-executed and follows modern best practices. However, I've found a critical issue with the versions of the new ESLint-related dependencies in package.json, which appear to be invalid and will likely break the build. Please correct these versions to published, stable ones.
| "@eslint/compat": "^2.0.3", | ||
| "@eslint/eslintrc": "^3.3.5", | ||
| "@eslint/js": "^9.39.4", | ||
| "eslint": "^9.39.4", | ||
| "eslint-config-egg": "^14.1.0", | ||
| "globals": "^16.2.0", |
There was a problem hiding this comment.
The versions for several new ESLint-related dependencies appear to be incorrect as they do not correspond to any published versions on npm. This will likely cause the npm install command to fail.
Please verify the versions for @eslint/compat, @eslint/eslintrc, @eslint/js, eslint, and globals and update them to valid, published versions from the npm registry.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.x #5825 +/- ##
==========================================
- Coverage 99.39% 99.39% -0.01%
==========================================
Files 36 36
Lines 3825 3824 -1
Branches 585 585
==========================================
- Hits 3802 3801 -1
Misses 23 23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|