Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precommit message rule #99

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ''"
}
}
}