DEV Community

Discussion on: Setting up a Minimal, Yet Useful JavaScript Dev Environment

Collapse
 
kamilogorek profile image
Kamil Ogórek

The only thing precommit package do, is running all the scripts listed in package.json, eg. "pre-commit": ["test", "lint"] before every git commit command.
When you install it, it sets up everything for you, so that you don't need to do or remember anything.

Collapse
 
dimpiax profile image
Dmytro Pylypenko

Sounds good, does it cancel operation commit in case of not successful command execution, like 'test' etc?

Thread Thread
 
kamilogorek profile image
Kamil Ogórek

That's exactly how it works. There is --no-verify flag (which is a default git flag, rather than any other library thing), but I doesn't recommend using it if you wish to push your commits :)