zlacker

[parent] [thread] 1 comments
1. warp+(OP)[view] [source] 2025-02-17 17:49:22
100%, I was using husky because we were using it at work. But it turns out for my use-case all I needed was this in my package.json:

    "scripts": {
        "postinstall": "git config --local core.hooksPath etc/hooks"
    },
replies(1): >>rav+8B
2. rav+8B[view] [source] 2025-02-17 22:14:28
>>warp+(OP)
Ooh, core.hooksPath is quite nifty. I usually use something like

         ln -sf ../../scripts/git-pre-commit-hook .git/hooks/pre-commit
which simply adds a pre-commit symlink to a script in the repo's scripts/ dir. But hooksPath seems better.
[go to top]