Gathering detailed insights and metrics for validate-commit-msg-smart
Gathering detailed insights and metrics for validate-commit-msg-smart
Gathering detailed insights and metrics for validate-commit-msg-smart
Gathering detailed insights and metrics for validate-commit-msg-smart
npm install validate-commit-msg-smart
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
56 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Dec 22, 2022
Latest Version
1.1.2
Package Id
validate-commit-msg-smart@1.1.2
Size
8.00 kB
NPM Version
2.15.9
Node Version
4.4.7
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
This provides you a binary that you can use as a githook to validate the commit message. I recommend
ghooks. You'll want to make this part of the commit-msg
githook.
Validates that your commit message follows this format:
<type>(<scope>): <subject>
You can specify options in package.json
1{ 2 "config": { 3 "validate-commit-msg": { 4 "types": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert", "regexp jira\\-\\d+", "regexp jira\\-\\d+\\s?[feat|fix|docs|style|refactor|perf|test|chore|revert]"], // default 5 "warnOnFail": false, // default 6 "maxSubjectLength": 100, // default 7 "subjectPattern": ".+", // default 8 "subjectPatternErrorMsg": 'subject does not match subject pattern!', // default 9 "helpMessage": "" //default 10 } 11 } 12}
These are the types that are allowed for your commit message. If omitted, the value is what is shown above.
Types support validate jira plugin Git Integration for JIRA 's format now. For example git commit message:
jira-666: WoW! I can validate commit message for jira now.
jira-667 feat: support jira git plugin now.
You can also specify: "types": "*"
to indicate that you don't wish to validate types
You can use custom regexp in "types" to validate some special types, For example:
// in package.json
"types": [
"regexp \\[git\\-\\d+\\]\\s?task"
]
// in commit message
[git-0730] task: support custom RegExp in types now.
** Must start with RegExp
and Can't use ():
in types' RegExp. **
If this is set to true
errors will be logged to the console, however the commit will still pass.
This will control the maximum length of the subject.
Optional, accepts a RegExp to match the commit message subject against.
If subjectPattern
is provided, this message will be displayed if the commit message subject does not match the pattern.
If provided, the helpMessage string is displayed when a commit message is not valid. This allows projects to provide a better developer experience for new contributors.
The helpMessage
also supports interpoling a single %s
with the original commit message.
If the commit message begins with WIP
then none of the validation will happen.
This was originally developed by contributors to the angular.js project. I pulled it out so I could re-use this same kind of thing in other projects.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More