Skip to content

Commit

Permalink
Merge pull request #99 from alma/chore/precommit-message-rule
Browse files Browse the repository at this point in the history
Precommit message rule
  • Loading branch information
joyet-simon authored Jun 20, 2024
2 parents 3e2352b + a71991a commit b115c15
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ metadata/
/.editorconfig

package-lock.json

# coverage report
coverage/
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.27.0
hooks:
- id: commitizen
name: Check commit message format
stages: [ commit-msg ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down Expand Up @@ -37,7 +43,7 @@ repos:
- [email protected]
- [email protected]
- [email protected]

# - repo: https://github.com/returntocorp/semgrep
# rev: v1.27.0
# hooks:
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
7 changes: 7 additions & 0 deletions cz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
commitizen:
name: cz_conventional_commits
tag_format: v$version
update_changelog_on_bump: true
version: 4.5.1
version_scheme: semver
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
"license": "ISC",
"homepage": "https://github.com/alma/sfcc-plugin",
"devDependencies": {
"@commitlint/config-conventional": "^13.2.0",
"@types/chai": "^4.3.5",
"chai": "^3.5.0",
"chai-subset": "^1.6.0",
"commitlint": "^13.2.1",
"del": "^6.1.1",
"dotenv": "^16.0.2",
"dw": "^1.0.1",
Expand All @@ -41,7 +43,7 @@
"eslint-plugin-sitegenesis": "~1.0.0",
"gulp": "^4.0.2",
"gulp-zip": "^5.1.0",
"husky": "^4.2.5",
"husky": "^4.3.8",
"isml-linter": "^5.40.3",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
Expand Down Expand Up @@ -81,7 +83,8 @@
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"pre-push": "npm run lint"
"pre-push": "npm run lint",
"commit-msg": "npx --no -- commitlint --edit ''"
}
}
}

0 comments on commit b115c15

Please sign in to comment.