rtk icon indicating copy to clipboard operation
rtk copied to clipboard

pnpm lint causing issue when ESLint isn't used

Open timothyclin opened this issue 8 months ago • 7 comments

I have a project that uses pnpm and biome as linter. RTK seems to insist rewrite pnpm lint to rtk lint, which is then dependent on ESLint that I do not use. This causes the agent to get into a re-try loop. Despite several notes I provided in Agents.MD, the confusion seems big enough that the agents kept tripping over this. Sometimes it'd eventually figure out what to do.

Proof -

# Test RTK rewrite of pnpm lint
$ rtk rewrite "pnpm lint"
rtk lint

timothyclin avatar Mar 17 '26 16:03 timothyclin

my current workaround is to use pnpm run lint, which rtk doesn't rewrite.

timothyclin avatar Mar 17 '26 16:03 timothyclin

I’m taking this issue. I’ll adjust rewrite behavior so pnpm lint is routed through rtk pnpm lint (not rtk lint) to avoid ESLint-specific loops, with tests, in a focused PR against develop.

TechWizard9999 avatar Mar 18 '26 06:03 TechWizard9999

I’ve submitted a PR to address this issue: #678

Changes include:

  • routing pnpm lint to rtk pnpm lint instead of forcing rtk lint
  • preserving pnpm lint arguments in rewrite output
  • adding regression tests for both plain and argumented pnpm lint rewrites

Validation run:

  • cargo fmt --all --check
  • rtk cargo clippy --all-targets
  • rtk cargo test
  • ./target/debug/rtk rewrite "pnpm lint" => rtk pnpm lint

Please review when you get a chance.

TechWizard9999 avatar Mar 18 '26 06:03 TechWizard9999

wshm · Automated triage by AI

🔍 Automated Triage

🐛 Category bug
🟡 Priority medium
🎯 Confidence 85%

Summary

pnpm lint is unconditionally rewritten to rtk lint (which assumes ESLint), breaking projects that use alternative linters like biome; PR #678 is already in progress.

This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.


Triaged automatically by wshm · This is an automated analysis, not a human review.

pszymkowiak avatar Mar 20 '26 15:03 pszymkowiak

Would be great to have it, it is quite annoying right now. I worked around by changing to running pnpm run lint

dimitur2204 avatar Jun 24 '26 07:06 dimitur2204

seems like there's config for this, fixed as of https://github.com/rtk-ai/rtk/pull/1398. so i think can be closed?

[hooks]
exclude_commands = ["pnpm lint", "npm run lint", "biome check"]

PeterCardenas avatar Jul 20 '26 22:07 PeterCardenas

Closing as a duplicate of #3117, which reports the same rewrite of pnpm lint and biome invocations to the ESLint-only rtk lint filter and adds detail on how the resulting failure gets masked. Please follow up there.

KuSh avatar Sep 13 '26 00:09 KuSh