This repository was archived by the owner on May 1, 2024. It is now read-only.
pre-commit hook
#529
-
As we know, we have a lot of pre-commit hooks tools. I use pre-commit (https://pre-commit.com) and it will be great, if npm will support it (write .pre-commit-hooks.yaml config), for example, for run npm audit as hook before commit. Can you support it? |
Beta Was this translation helpful? Give feedback.
Answered by
ljharb
Aug 15, 2021
Replies: 1 comment 5 replies
-
You can already do that by invoking npm audit in your git hook - what would you imagine npm would do that’s different? Note that it’s very very dangerous for tools to automatically write stuff to git hooks; there’s a reason why you can’t use git to commit an activated git hook. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
Niccolum
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can already do that by invoking npm audit in your git hook - what would you imagine npm would do that’s different?
Note that it’s very very dangerous for tools to automatically write stuff to git hooks; there’s a reason why you can’t use git to commit an activated git hook.