Skip to content

fix(hook): delegate lint scripts to package managers - #3289

Open
ousamabenyounes wants to merge 1 commit into
rtk-ai:developfrom
ousamabenyounes:fix/hook-lint-script-rewrite
Open

fix(hook): delegate lint scripts to package managers#3289
ousamabenyounes wants to merge 1 commit into
rtk-ai:developfrom
ousamabenyounes:fix/hook-lint-script-rewrite

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

  • Keep npm/pnpm run lint and pnpm lint rewrites on the package-manager route so project scripts are preserved.
  • Keep explicit ESLint/Biome invocations routed through rtk lint.

Test verification (RED -> GREEN)

RED on upstream-base behavior with the new regression test:

thread 'discover::registry::tests::test_rewrite_lint_scripts_delegate_to_package_manager' panicked at src/discover/registry.rs:3291:13:
assertion `left == right` failed: Failed for command: npm run lint
  left: Some("rtk lint")
 right: Some("rtk npm run lint")
test discover::registry::tests::test_rewrite_lint_scripts_delegate_to_package_manager ... FAILED

GREEN after the fix:

test discover::registry::tests::test_rewrite_lint_scripts_delegate_to_package_manager ... ok
test result: ok. 45 passed; 0 failed; 0 ignored; 0 measured; 2475 filtered out

Full local CI replay:

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all
test result: ok. 2512 passed; 0 failed; 8 ignored; 0 measured; 0 filtered out

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --all
  • Manual testing: rtk rewrite "npm run lint" behavior covered by regression test

Fixes #3286

Important: All PRs must target the develop branch (not master).

@ousamabenyounes
ousamabenyounes force-pushed the fix/hook-lint-script-rewrite branch from 8cb9667 to 396eb3d Compare July 29, 2026 00:32
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.

Hook rewrite: 'pnpm/npm run lint' incorrectly rewritten to 'rtk lint' (assumes ESLint, breaks non-ESLint lint scripts)

1 participant