Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 9, 2025

This PR migrates the project from ESLint to oxlint using the official @eggjs/oxlint-config configuration. The migration maintains full compatibility with the existing codebase while leveraging oxlint's superior performance and modern rule set.

Changes Made

Dependencies

  • Removed: eslint@^8.54.0 and eslint-config-egg@^13.0.0 (deprecated ESLint v8)
  • Added: oxlint@^1.11.1 and @eggjs/oxlint-config@^1.0.0

Configuration

  • Removed: .eslintrc configuration file
  • Added: .oxlintrc.json extending @eggjs/oxlint-config with compatibility overrides

Scripts

  • Updated lint script from eslint src test --ext ts to oxlint src test
  • All existing npm scripts (pretest, preci) continue to work unchanged
  • The --fix flag continues to work for auto-fixing issues

Benefits

  1. Performance: oxlint is significantly faster than ESLint (22ms vs previous slower execution)
  2. Modern tooling: Built on Rust with better performance characteristics
  3. Maintained compatibility: All existing code passes linting with 0 errors and 0 warnings
  4. Future-ready: Uses the official @eggjs/oxlint-config for consistent standards

Compatibility

The migration includes carefully tuned rule overrides in .oxlintrc.json to ensure full backward compatibility with the existing codebase. All tests pass (96 passing, 1 pending) and the build process remains intact.

Verification

  • ✅ Linting: npm run lint - 0 errors, 0 warnings
  • ✅ Tests: npm test - All 96 tests passing
  • ✅ Build: npm run prepublishOnly - Successful build
  • ✅ CI checks: npm run preci - All checks pass

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​eggjs/​oxlint-config@​1.0.0701007992100
Addedoxlint@​1.11.1921008496100

View full report

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​eggjs/​oxlint-config@​1.0.0701007992100
Addedoxlint@​1.11.1921008496100

View full report

Copilot AI changed the title [WIP] migrate from eslint to oxlint with @eggjs/oxlint-config Migrate from ESLint to oxlint with @eggjs/oxlint-config Aug 9, 2025
Copilot AI requested a review from fengmk2 August 9, 2025 12:25
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/utility@68

commit: 2a531d0

@fengmk2 fengmk2 changed the title Migrate from ESLint to oxlint with @eggjs/oxlint-config chore: migrate from ESLint to oxlint with @eggjs/oxlint-config Aug 11, 2025
@fengmk2 fengmk2 marked this pull request as ready for review August 11, 2025 05:13
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fengmk2 fengmk2 merged commit 0d8b4da into master Aug 11, 2025
42 of 60 checks passed
@fengmk2 fengmk2 deleted the copilot/fix-0dc25e4f-7f72-4f0e-8dc7-72190c23e507 branch August 11, 2025 05:15
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.

2 participants