Appearance
Git hooks
Husky runs two Git hooks that check each commit before Git records it.
The prepare script in the root package.json runs Husky, and Husky installs the hooks from .husky. Husky makes the _ directory in .husky. Do not edit it.
commit-msg
The commit-msg hook runs commitlint on the commit message. commitlint.config.ts holds the rules for the message and its trailers.
pre-commit
The pre-commit hook runs lint-staged on the staged files. The lint-staged entry in the root package.json sets the checks for each type of file:
- ESLint checks JavaScript, TypeScript and YAML files, and fails on a warning.
- markdownlint checks each Markdown file.
- Vale checks each Markdown file in
knowledgeandproducts.