Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add branch-name-lint to enforce a Git branch naming convention. Add a Husky pre-push hook to run the linter before pushing a branch. To manually run the linter: pnpm run lint:branch Branches must consist of a valid prefix (see below), a forward-slash (`/`), and a name that begins with a letter and contains only letters, digits, hyphens (`-`) and periods (`.`). E.g. `feat/implement-thing`. Valid branch prefixes are: - `chore` For miscellaneous changes that do not fall into any other category. - `ci` For changes to CI configuration files and scripts. - `core` For changes to build processes, tooling, dependencies or general project structure. - `doc` For changes to documentation. - `experiment` For temporary experiments/spikes. These branches will not be merged. - `feat` For new features. - `fix` For bug fixes. - `hotfix` For critical bug fixes that will need to be merged directly into the production environment. - `release` For preparing releases to production. - `test` For changes to tests. The (case-insensitive) validation regex is: ^[a-z]+/[a-z][a-z0-9.-]*$ NOTES: - Using a fork of the official branch-name-lint repo in which we have implemented our own fix for misleading error messages (barzik/branch-name-lint#55) and merged a community fix for general mishandling of errors (barzik/branch-name-lint#45). LINKS: - https://github.com/barzik/branch-name-lint - https://github.com/al/branch-name-lint/tree/integration/error-handling-issues
- Loading branch information