Skip to content

Commit

Permalink
chore: make sure hooks are installed (#586)
Browse files Browse the repository at this point in the history
* chore: make sure hooks are installed

* fix: skip post install in ci
  • Loading branch information
maratsh authored Feb 20, 2025
1 parent 532310a commit fe7b399
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .commitlintrc.json

This file was deleted.

4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ repos:
hooks:
- id: gitleaks
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.30.1
rev: v4.2.1
hooks:
- id: commitizen
stages:
- commit-msg
- repo: local
hooks:
- id: npm-audit
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Libraries and packages are created once using Typescript and then automatically
- [gitleaks](https://github.com/gitleaks/gitleaks)
- [commitizen](https://github.com/commitizen-tools/commitizen)

> Before proceeding to commit, please make sure hooks are installed by running 'npm run postinstall'
### Creating a new library or package

To easily add a new library or package you can run a command that creates a sample Hello World Typescript module on either `libs` or `packages`:
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"license": "Apache-2.0",
"scripts": {
"build": "nx run-many --verbose --target=build",
"create:sample": "./scripts/create-sample.sh"
"create:sample": "./scripts/create-sample.sh",
"install-hooks": "pre-commit install -t commit-msg -t pre-commit",
"postinstall": "[[ -z \"$CI\" ]] && npm run install-hooks || echo 'Skipping postinstall in CI'"
},
"private": "true",
"publishConfig": {
Expand Down

0 comments on commit fe7b399

Please sign in to comment.