mm
mm copied to clipboard
Migrate from eslint to oxlint with @eggjs/oxlint-config
This PR migrates the project from eslint to oxlint using the new @eggjs/oxlint-config shared configuration.
Changes Made
Dependencies
-
Removed:
eslint(8) andeslint-config-egg(14) -
Added:
oxlint(1) and@eggjs/oxlint-config(1)
Configuration
-
Replaced:
.eslintrcwith.oxlintrc.json -
Extended:
@eggjs/oxlint-configfor consistent linting rules across eggjs projects - Configured: Node.js and Mocha environments
- Customized: Rules to accommodate existing code patterns without requiring changes
Scripts
-
Updated:
lintscript fromeslint --cache src test --ext .tstooxlint src test -
Simplified:
pretestscript by removing--fixflag (oxlint doesn't require auto-fixing)
Benefits
- Performance: oxlint is significantly faster than eslint (26ms vs previous eslint times)
-
Consistency: Uses shared
@eggjs/oxlint-configfor consistent rules across eggjs ecosystem - Modern tooling: Leverages the Rust-based oxc linting infrastructure
- 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.