fix: allow npm install but block new deps #5
Loading…
Reference in a new issue
No description provided.
Delete branch "npm-install"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Read the commit body for details.
We had a problem where I only wanted to block installing new npm dependencies like
npm install svgoornpm install --save-dev @sethfalco/eslint-config. However, this was actually blocking even the basenpm installcommand before.The reason is documented in the project README under Other Claude Quirks.
I fix this by creating a new hook for managing "advanced" use cases, which can handle this correctly. A perk to this approach is that we can also give reasons back in response, to Claude knows why it shouldn't. (Otherwise Claude is likely to simply try to work around it, like using
npm --prefix . install svgo.)We don't handle those workarounds, so they'll continue to go to
askinstead of being responded to.mentioned in commit
b619881d6b