Home > Posts Precommit hooks

Max Heinritz

Precommit hooks

Husky and lintstaged are indispensable tools for precommit hooks. Here’s an example: .lintstagedrc.json:

{
  "*.{js,ts,tsx,jsx,json}": "prettier --write"
}