Repository navigation
fix(rewrite): route direct biome invocations to rtk biome instead of rtk lint - #2378
Closed
feliperugai wants to merge 3 commits into
Closed
feliperugai wants to merge 3 commits into
feliperugai wants to merge 3 commits into
Conversation
…rtk lint The lint rewrite rule stripped the biome token, so 'biome check x' and 'npx biome check x' became 'rtk lint check x' — the ESLint adapter. In Biome-only projects ESLint is absent and rtk printed a misleading 'Linter process terminated abnormally (possibly out of memory)' warning. Direct invocations (biome, npx biome, pnpm exec/dlx biome, npm exec/x biome, pnpx biome) now rewrite to rtk biome, which executes the Biome CLI through the built-in biome TOML filter. Script-runner forms (npm run biome, pnpm run biome) fall through to the generic npm/pnpm rules, preserving package.json script semantics. Refs rtk-ai#1489, complements PR rtk-ai#1491 which explicitly left direct biome invocations out of scope.
|
I'm also interested in the resolution of this specific issue |
blackfyre
reviewed
Jun 24, 2026
blackfyre
reviewed
Jun 24, 2026
blackfyre
suggested changes
Jun 24, 2026
4 tasks done
Collaborator
|
Closing this in favour of #3150, which fixes the same Biome routing, has an end-to-end test and green CI, and builds on current develop (this branch predates the pipeline_safety field on rules). If you prefer |
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.
Summary
biome check x/npx biome check xwere rewritten tortk lint check x— the ESLint adapter. The rewrite strips thebiometoken, sortk lintfalls back to ESLint; in Biome-only projects the subprocess dies in ~0.2s and rtk prints a misleading[warn] Linter process terminated abnormally (possibly out of memory).biome,npx biome,pnpm exec biome,pnpm dlx biome,npm exec biome,npm x biome,pnpx biome) now rewrite tortk biome, which runs the Biome CLI through the built-insrc/filters/biome.tomlfilter.npm run biome,pnpm run biome) fall through to the generic npm/pnpm rules (rtk npm run biome/rtk pnpm run biome), preserving package.json script semantics — same philosophy as fix(rewrite): route npm lint scripts through rtk npm (biome-safe) #1491.Refs #1489 (same root cause,
npm run lintsymptom). Complements #1491, which routesnpm/npxlint scripts but explicitly left directbiomeinvocations out of scope — this PR covers that gap.Repro (before)
After
Test plan
cargo fmt --all && cargo clippy --all-targets && cargo test— 2154 passedrtk <command>output inspectedcargo run -- rewrite "npx biome check src/x.ts"→rtk biome check src/x.tscargo run -- rewrite "biome check --write ."→rtk biome check --write .cargo run -- rewrite "npm run biome"→rtk npm run biomecargo run -- rewrite "npx eslint src/"→rtk lint src/(unchanged)rtk biome check src/.../review.service.ts→biome: oktest_classify_biome,test_rewrite_biome,test_rewrite_biome_check_keeps_args,test_rewrite_biome_script_runner_goes_to_package_manager