Skip to content

linter: Automate updates for compatible rules in the @oxlint/migrate and eslint-plugin-oxlint repos #18413

@connorshea

Description

@connorshea

Needing to coordinate releases of updated rules with these two projects manually is a bit goofy, we could easily turn the into JSON files that we commit to the oxc repo, and then the auto-release scripts for both tools can be updated to read from that JSON file accordingly.

e.g. these PRs could be automated to avoid busywork:

We should copy the VITEST_COMPATIBLE_JEST_RULES array in crates/oxc_linter/src/utils/mod.rs into a JSON file, and then enforce that that JSON match the Rust array. (I don't know if there's a good way to just read the array from the JSON file as part of compilation so we can use it as the single-source-of-truth, but that's also an option)

And then we can simply point the releaser scripts for oxlint-migrate and eslint-plugin-oxlint over at the GitHub URL for this JSON file on the current v.1x release ref of the oxc repo.

In oxlint-migrate, that means updating the logic to pull from a JSON file instead of https://github.com/oxc-project/oxlint-migrate/blob/main/scripts/constants.ts (or I guess just update the constants.ts to be a generated file but shrug)

Metadata

Metadata

Assignees

Labels

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions