-
-
Notifications
You must be signed in to change notification settings - Fork 950
linter: Automate updates for compatible rules in the @oxlint/migrate and eslint-plugin-oxlint repos #18413
@oxlint/migrate and eslint-plugin-oxlint repos#18413Description
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:
- refactor: mark
no-unneeded-async-expect-functionas vitest compatible oxlint-migrate#343 - feat(linter/vitest): prefer-mock-return-shorthand rule vitest compatible oxlint-migrate#330
- prefer-mock-return-shorthand compatible vitest rule eslint-plugin-oxlint#607
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
Type
Fields
Give feedbackPriority
Start date
Target date
Effort