Commit 0d8b4da
chore: migrate from ESLint to oxlint with @eggjs/oxlint-config (#68)
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
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>1 parent 62de142 commit 0d8b4da
3 files changed
+53
-9
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments