Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 9, 2025

This PR migrates the project from eslint to oxlint using the new @eggjs/oxlint-config shared configuration.

Changes Made

Dependencies

  • Removed: eslint (8) and eslint-config-egg (14)
  • Added: oxlint (1) and @eggjs/oxlint-config (1)

Configuration

  • Replaced: .eslintrc with .oxlintrc.json
  • Extended: @eggjs/oxlint-config for consistent linting rules across eggjs projects
  • Configured: Node.js and Mocha environments
  • Customized: Rules to accommodate existing code patterns without requiring changes

Scripts

  • Updated: lint script from eslint --cache src test --ext .ts to oxlint src test
  • Simplified: pretest script by removing --fix flag (oxlint doesn't require auto-fixing)

Benefits

  1. Performance: oxlint is significantly faster than eslint (26ms vs previous eslint times)
  2. Consistency: Uses shared @eggjs/oxlint-config for consistent rules across eggjs ecosystem
  3. Modern tooling: Leverages the Rust-based oxc linting infrastructure
  4. Zero code changes: Migration completed without requiring any source code modifications

Verification

  • ✅ All 78 tests pass (2 pending, unchanged)
  • ✅ Linting passes with 0 warnings and 0 errors
  • ✅ Build and type checking work correctly
  • ✅ CI commands (preci, ci) continue to work as expected

The migration maintains full backward compatibility while modernizing the linting infrastructure.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot 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 Copilot AI requested a review from fengmk2 August 9, 2025 12:32
Copilot finished work on behalf of fengmk2 August 9, 2025 12:32
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