The prepare command is a reserved npm command that runs automatically after yarn install. I'm configuring Husky within the prepare script so that whenever someone runs yarn install, Husky will set up the pre-commit hook. This pre-commit hook runs yarn lint and yarn localization before allowing code to be committed. While this might slow down the commit process slightly, it ensures that code checks are performed upfront, saving time compared to waiting for checks to pass after submitting a pull request.
The
prepare
command is a reservednpm
command that runs automatically afteryarn install
. I'm configuring Husky within the prepare script so that whenever someone runs yarn install, Husky will set up the pre-commit hook. This pre-commit hook runsyarn lint
andyarn localization
before allowing code to be committed. While this might slow down the commit process slightly, it ensures that code checks are performed upfront, saving time compared to waiting for checks to pass after submitting a pull request.