Skip to content

Commit

Permalink
Merge pull request #9 from oidacra/config-husky-commitlint
Browse files Browse the repository at this point in the history
Config husky and commitlint
  • Loading branch information
oidacra authored Jan 27, 2024
2 parents 0a3c07d + d0f41e9 commit de4e494
Show file tree
Hide file tree
Showing 7 changed files with 572 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on: # when does the workflow run?
push:
branches:
- main
env:
HUSKY: 0 # Disable Husky hooks

jobs:
build_and_deploy:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ permissions:
actions: read # Needed for nx-set-shas
contents: read # Needed for nx-set-shas
checks: write # Needed for GITHUB_TOKEN

env:
HUSKY: 0 # Disable Husky hooks

jobs:
build_and_preview: # name of the job
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit ${1}
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nx format:write
nx affected -t lint,test --parallel=2
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"start": "nx serve",
"build": "nx build",
"test": "nx test"
"test": "nx test",
"postinstall": "husky"
},
"private": true,
"dependencies": {
Expand All @@ -17,6 +18,7 @@
"@angular/platform-browser": "17.1.0",
"@angular/platform-browser-dynamic": "17.1.0",
"@angular/router": "17.1.0",
"@commitlint/cli": "^18.6.0",
"@ngrx/component-store": "^17.0.1",
"@nx/angular": "17.2.8",
"ng-zorro-antd": "^17.1.0",
Expand Down Expand Up @@ -50,6 +52,7 @@
"eslint": "8.48.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-playwright": "^0.15.3",
"husky": "^9.0.6",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest-preset-angular": "13.1.4",
Expand Down
Loading

0 comments on commit de4e494

Please sign in to comment.