Gathering detailed insights and metrics for @web-bee-ru/branch-name-lint
Gathering detailed insights and metrics for @web-bee-ru/branch-name-lint
Gathering detailed insights and metrics for @web-bee-ru/branch-name-lint
Gathering detailed insights and metrics for @web-bee-ru/branch-name-lint
npm install @web-bee-ru/branch-name-lint
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (99.83%)
Shell (0.17%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
91 Stars
142 Commits
25 Forks
3 Watchers
1 Branches
12 Contributors
Updated on Apr 26, 2025
Latest Version
2.1.1
Package Id
@web-bee-ru/branch-name-lint@2.1.1
Unpacked Size
9.82 kB
Size
3.69 kB
File Count
6
NPM Version
8.1.2
Node Version
16.13.2
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
7
Validating and linting the git branch name. Create a config file or use the default configuration file. Use it in husky config file to make sure that your branch will not be rejected by some pesky Jenkins branch name conventions. You may use it as part of a CI process or just as an handy npx
command.
$ npm install branch-name-lint
$ npx branch-name-lint
$ npx branch-name-lint --help
Usage
npx branch-name-lint [configfileLocation JSON]
Examples
$ branch-name-lint
$ branch-name-lint config-file.json
Any Valid JSON file with branchNameLinter
attribute.
{
"branchNameLinter": {
"prefixes": [
"feature",
"hotfix",
"release"
],
"suggestions": {
"features": "feature",
"feat": "feature",
"fix": "hotfix",
"releases": "release"
},
"banned": [
"wip"
],
"skip": [
"skip-ci"
],
"disallowed": [
"master",
"develop",
"staging"
],
"separator": "/",
"msgBranchBanned": "Branches with the name \"%s\" are not allowed.",
"msgBranchDisallowed": "Pushing to \"%s\" is not allowed, use git-flow.",
"msgPrefixNotAllowed": "Branch prefix \"%s\" is not allowed.",
"msgPrefixSuggestion": "Instead of \"%s\" try \"%s\".",
"msgseparatorRequired": "Branch \"%s\" must contain a separator \"%s\"."
}
}
In order to check the branch name with a regex you can add a a regex as a string under the branchNameLinter in your config JSON. You can also pass any options for the regex (e.g. case insensitive: 'i')
{
"branchNameLinter": {
"regex": "^([A-Z]+-[0-9]+.{5,70})",
"regexOptions": "i",
...
"msgDoesNotMatchRegex": 'Branch "%s" does not match the allowed pattern: "%s"'
}
}
After installation, just add in any husky hook as node modules call.
"husky": {
"hooks": {
"pre-push": "npx branch-name-lint [sample-configuration.json]"
}
},
1const branchNameLint = require('branch-name-lint'); 2 3branchNameLint(); 4//=> 1 OR 0.
Type: object
Default:
{
prefixes: ['feature', 'hotfix', 'release'],
suggestions: {features: 'feature', feat: 'feature', fix: 'hotfix', releases: 'release'},
banned: ['wip'],
skip: [],
disallowed: ['master', 'develop', 'staging'],
separator: '/',
msgBranchBanned: 'Branches with the name "%s" are not allowed.',
msgBranchDisallowed: 'Pushing to "%s" is not allowed, use git-flow.',
msgPrefixNotAllowed: 'Branch prefix "%s" is not allowed.',
msgPrefixSuggestion: 'Instead of "%s" try "%s".',
msgseparatorRequired: 'Branch "%s" must contain a separator "%s".'
}
MIT © Ran Bar-Zik
No vulnerabilities found.
Reason
29 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 4/14 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
dangerous workflow patterns detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
Reason
SAST tool is not run on all commits -- score normalized to 0
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