Hacker News new | ask | show | jobs
by realitylabs 5 days ago
Just out of curiousity, what are the 8 hooks you run?
1 comments

The precommit checks I run are:

- end-with-blank-line: normalize file endings

- find-do-not-commit: do not commit files that include "DO NOT COMMIT"

- lint-code: run `$REPO/scripts/lint` if it exists

- lint-nodejs: run `$REPO/{pnpm/yarn/npm}` lint if `package.json` exists

- lint-shellcheck: shellcheck all the files that have no extensions or end in `.sh` that have a shell-shebang

- lint-swift: run swiftlint

- prevent-commit-secrets: run ripsecrets to avoid committing secrets and credentials

- validate: run `$REPO/scripts/validate` if it exists

By default all of the scripts check the files in the git staging area, but they can also be run standalone to check everything. You can find them here: https://github.com/webcoyote/git-multi-hook. Glad to take suggestions for more.