Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 10, 2025

This PR adds support for oxlint's JavaScript plugin system, making eslint-plugin-eggache compatible with both ESLint and oxlint.

Changes

Package Metadata

  • Updated package.json description to mention oxlint compatibility
  • Added relevant keywords (oxlint, eslint, eslintplugin, eggjs, egg) for better discoverability
  • Added oxlint as dev dependency (v1.22.0)
  • Added test:oxlint npm script for oxlint-specific testing

Plugin Metadata

  • Added meta field to plugin export with name and version (required by oxlint's JavaScript plugin loader)

Rule Metadata Improvements

Enhanced all three rules (no-only-tests, no-override-exports, no-unexpected-plugin-keys) with proper metadata:

  • Added type: 'problem' field to meta section for better linter compatibility
  • Fixed fixable field in no-only-tests from true to 'code' (proper ESLint/oxlint format)

Documentation

Updated README.md with comprehensive oxlint support:

  • Added prominent mention of oxlint compatibility in the header
  • Created separate usage sections for ESLint and oxlint
  • Provided example configurations for both linters with JSON and extends formats

Oxlint Tests

Added comprehensive oxlint integration test suite in test/oxlint/:

  • Test fixtures for all three rules (code that should trigger violations)
  • Integration tests (4 new automated tests) that verify:
    • Plugin exports required metadata (meta.name, meta.version)
    • All rules have proper structure (meta.type, meta.docs, create)
    • Plugin is compatible with ES module imports (required by oxlint)
    • Configuration and fixture files exist
  • oxlint configuration (.oxlintrc.json) for testing
  • README with manual testing instructions
  • Updated .eslintignore to exclude test fixtures (they contain intentional violations)

Compatibility

The plugin maintains 100% backward compatibility with ESLint while adding full support for oxlint. The existing plugin structure was already ESLint-compliant, requiring only minimal metadata and documentation updates.

Testing

  • ✅ All 23 tests pass (19 original + 4 new oxlint integration tests)
  • ✅ Linting passes without errors
  • ✅ No breaking changes

Users can now seamlessly use this plugin with either ESLint or oxlint!

[!WARNING]

Fixes #7

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrating to oxlint js plugins</issue_title>
<issue_description>document see https://oxc.rs/blog/2025-10-09-oxlint-js-plugins.html
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #7


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link

coderabbitai bot commented Oct 10, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits October 10, 2025 02:41
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Migrate existing codebase to oxlint js plugins Migrate to oxlint JavaScript plugins support Oct 10, 2025
@Copilot Copilot AI requested a review from fengmk2 October 10, 2025 02:45
Copilot finished work on behalf of fengmk2 October 10, 2025 02:45
@fengmk2
Copy link
Member

fengmk2 commented Oct 10, 2025

@copilot should add tests with oxlint

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

Copilot AI commented Oct 10, 2025

@copilot should add tests with oxlint

Added comprehensive oxlint tests in commit ab0f05f. The test suite includes:

  • 4 automated integration tests verifying plugin structure and ES module compatibility
  • Test fixtures for all three rules
  • oxlint configuration file
  • Documentation for manual testing

All 23 tests pass (19 original + 4 new oxlint tests).

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedoxlint@​1.22.0931008896100

View full report

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedoxlint@​1.22.0931008896100

View full report

Copilot finished work on behalf of fengmk2 October 10, 2025 03:31
@fengmk2
Copy link
Member

fengmk2 commented Oct 10, 2025

just work
image

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.

Migrating to oxlint js plugins

2 participants