When making a commit, the following Pre-Commit hooks run:
- test and documentation checks
- tests
- lint
- commit message validation (see "Commit Messages" below)
All commit messages must begin with one of the following prefixes:
fix:
feat:
refactor:
docs:
chore:
The prefix is used to bump the correct segment of the version number during the automatic release.
Run them with npm test
.
Run with npm run lint
.
- Create a file in
tests/rules/assertions
named thecamelCase
version of your rule name with the following template:
export default { invalid: [], valid: [] }
- Add your test file to
tests/rules/index.js
- Create a file in
src/rules
named thecamelCase
version of your rule name - Add your rule file to
src/index.js
Note: Sections "The following patterns are considered problems:" and "The following patterns are not considered problems:" are generated automatically using the test cases.