fix: allow npm install but block new deps #5

Merged
SethFalco merged 1 commit from npm-install into main 2026-03-15 17:32:03 +00:00
SethFalco commented 2026-03-15 17:31:44 +00:00 (Migrated from gitlab.com)

Read the commit body for details.


We had a problem where I only wanted to block installing new npm dependencies like npm install svgo or npm install --save-dev @sethfalco/eslint-config. However, this was actually blocking even the base npm install command 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 ask instead of being responded to.

Read the commit body for details. --- We had a problem where I only wanted to block installing new npm dependencies like `npm install svgo` or `npm install --save-dev @sethfalco/eslint-config`. However, this was actually blocking even the base `npm install` command 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 `ask` instead of being responded to.
SethFalco commented 2026-03-15 17:32:03 +00:00 (Migrated from gitlab.com)

mentioned in commit b619881d6b

mentioned in commit b619881d6bca13212e5927d007a793bdc7fa0a81
SethFalco (Migrated from gitlab.com) merged commit b619881d6b into main 2026-03-15 17:32:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/claude-config!5
No description provided.