Skip to content

chore: migrate from ESLint to oxlint with @eggjs/oxlint-config#5431

Closed
Copilot wants to merge 4 commits into
nextfrom
copilot/fix-c14b04f5-db2f-429f-ba7c-ca6b45e2e0fd
Closed

chore: migrate from ESLint to oxlint with @eggjs/oxlint-config#5431
Copilot wants to merge 4 commits into
nextfrom
copilot/fix-c14b04f5-db2f-429f-ba7c-ca6b45e2e0fd

Conversation

Copilot AI commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

This PR migrates the project from ESLint to oxlint, a high-performance Rust-based linter, using the shared @eggjs/oxlint-config configuration.

Changes Made

Dependencies

  • Removed: eslint and eslint-config-egg dependencies
  • Added: oxlint (^1.11.0) and @eggjs/oxlint-config (^1.0.0) as dev dependencies

Configuration

  • Replaced .eslintrc with .oxlintrc.json that extends from the shared @eggjs/oxlint-config
  • Migrated ignore patterns from .eslintignore to the ignorePatterns field in oxlint config
  • Removed old ESLint configuration files (.eslintrc, .eslintignore)

Scripts

  • Updated lint script from eslint src test --ext .ts to npx oxlint src test
  • Simplified pretest script to remove --fix flag (oxlint handles fixes differently)

Documentation

  • Updated references in CONTRIBUTING.md and site/docs/community/CONTRIBUTING.md from "Eslint" to "oxlint"

Benefits

  • Performance: oxlint is significantly faster than ESLint, improving development workflow
  • Consistency: Uses the shared @eggjs/oxlint-config for consistent linting rules across egg projects
  • Maintainability: Configuration is now much cleaner and easier to maintain by extending from the shared config
  • Compatibility: Maintains similar rule coverage with TypeScript, import, promise, unicorn, and other plugin equivalents
  • Future-proof: oxlint is actively developed and optimized for modern JavaScript/TypeScript projects

Testing

The migration has been tested and verified to:

  • ✅ Load configuration correctly using extends from @eggjs/oxlint-config
  • ✅ Find linting issues in TypeScript files
  • ✅ Work with the npm run lint script
  • ✅ Maintain existing ignore patterns
  • ✅ Preserve linting behavior for CI/CD workflows

The new setup finds similar issues to the previous ESLint configuration while running significantly faster.


💡 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2025

Copy link
Copy Markdown

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ccb845
Status: ✅  Deploy successful!
Preview URL: https://ec10e85b.egg-cci.pages.dev
Branch Preview URL: https://copilot-fix-c14b04f5-db2f-42.egg-cci.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2025

Copy link
Copy Markdown

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ccb845
Status: ✅  Deploy successful!
Preview URL: https://122f02ae.egg-v3.pages.dev
Branch Preview URL: https://copilot-fix-c14b04f5-db2f-42.egg-v3.pages.dev

View logs

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
@socket-security

socket-security Bot commented Aug 15, 2025

Copy link
Copy Markdown

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

View full report

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Copilot AI changed the title [WIP] chore: migrate from ESLint to oxlint with @eggjs/oxlint-config chore: migrate from ESLint to oxlint with @eggjs/oxlint-config Aug 15, 2025
Copilot AI requested a review from fengmk2 August 15, 2025 02:50
@fengmk2

fengmk2 commented Aug 31, 2025

Copy link
Copy Markdown
Member

@copilot should extends from @eggjs/oxlint-config

…figuration

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>

Copilot AI commented Aug 31, 2025

Copy link
Copy Markdown
Contributor Author

@copilot should extends from @eggjs/oxlint-config

Updated the configuration to extend from @eggjs/oxlint-config instead of manually defining all rules. This makes the configuration much cleaner and easier to maintain while preserving the project-specific ignore patterns. Commit: 9ccb845

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