Commit 98a8822
chore: migrate from eslint to oxlint with @eggjs/oxlint-config (#61)
This PR migrates the linting setup from ESLint to oxlint using the
official `@eggjs/oxlint-config` configuration.
## Changes Made
**Dependencies:**
- Removed `eslint` and `eslint-config-egg` from devDependencies
- Added `oxlint` and `@eggjs/oxlint-config` as devDependencies
**Configuration:**
- Removed `.eslintrc` and `.eslintignore` files
- Added `.oxlintrc.json` with appropriate configuration extending
`@eggjs/oxlint-config`
- Updated lint script from `eslint src test --ext ts` to `oxlint`
**Code Quality Improvements:**
- Fixed TypeScript type imports to use `type` keyword where appropriate
- Consolidated duplicate import statements in test files
## Benefits
- **Performance**: oxlint is significantly faster than ESLint (12ms vs
much slower ESLint execution)
- **Modern tooling**: oxlint is built with Rust and provides better
performance for large codebases
- **Consistency**: Uses the official EggJS oxlint configuration for
consistent code style across EggJS ecosystem projects
## Configuration Details
The oxlint configuration extends `@eggjs/oxlint-config` and includes
sensible rule overrides to maintain compatibility with the existing
codebase:
- Allows callback patterns (important for this library's dual
callback/promise API)
- Permits existing code patterns to minimize migration friction
- Maintains strict type checking and import consistency
All existing tests pass and the CLI functionality remains unchanged.
<!-- 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] <[email protected]>
Co-authored-by: fengmk2 <[email protected]>1 parent 5e71b75 commit 98a8822
File tree
7 files changed
+42
-17
lines changed- src
- test
7 files changed
+42
-17
lines changedThis file was deleted.
This 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments