Closed
Conversation
Copilot
AI
changed the title
[WIP] Add oxlint-plugin-eslint package for ESLint rules
linter: introduce Feb 26, 2026
oxlint-plugin-eslint
b021b07 to
4d9c1a2
Compare
Member
|
Closing in favour of #20009, which was based on the work in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
oxlint-plugin-eslintnpm package that exposes all of ESLint's built-in rules as an Oxlint JS plugin, allowing users to use ESLint rules directly (e.g., as a hotfix when Oxlint's native implementation has a bug).Usage
{ "jsPlugins": ["oxlint-plugin-eslint"], "rules": { "eslint-js/no-unused-vars": "error" } }Plugin
meta.nameiseslint-js.Changes
npm/oxlint-plugin-eslint/— New package with dual ESM/CJS exports andeslintas a peer dependency.apps/oxlint/src-js/plugin-eslint/index.ts— Plugin entry point; exports{ meta: { name: "eslint-js" }, rules }.apps/oxlint/scripts/generate-plugin-eslint.ts— Build-time codegen script that:eslint/lib/rules/(excluding the registryindex.js) to get all rule names.src-js/generated/plugin-eslint/rules/.index.js) using getter functions +createRequire.rule_names.tsconsumed by the TSDown config.apps/oxlint/scripts/build.ts— Runs the codegen script before TSDown and deletessrc-js/generated/plugin-eslint/afterwards.apps/oxlint/tsdown.config.ts— Three new build configs: ESM main entry (+ DTS), CJS main entry, and all 292 CJS rule files output todist-pkg-plugin-eslint/.oxc_release.toml— Addsnpm/oxlint-plugin-eslint/package.jsonto theoxlintversioned-files list..github/workflows/release_apps.yml— Copiesdist-pkg-plugin-eslint/into the npm package and publishes it alongside@oxlint/plugins.ESLint 9 exports restriction
ESLint 9 blocks access to
eslint/lib/rules/*via itsexportsmap. Each generated rule wrapper bypasses this using:Rules are lazy-loaded via getter functions — a rule's code is only
require()d when the rule is first accessed.Original prompt
oxlint-plugin-eslint#19746✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.