npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

branchname-validator

v1.3.0

Published

Enforces Git branch naming conventions with 20+ supported patterns. It ensures branches follow the required format (e.g., feature/branch-name, bugfix/issue-123, docs/api-docs, refactor/db-queries) and prevents invalid names before creation. Ideal for team

Downloads

194

Readme

Branch Name Validator

A validator tool designed to validate the Git branch naming conventions in your projects.

With Branch Name Validator, you can easily enforce Git branch naming conventions. It ensures branches follow the required format (e.g., feature/branch-name, bugfix/issue-123) and prevents invalid names before creation. Ideal for teams maintaining consistent workflows! 🚀

Table of Contents

This package enforces branch naming conventions using Git hooks (pre-push and pre-checkout). It ensures that only correctly named branches can be created or pushed, maintaining a clean and structured Git workflow.

✨ Features

✅ Prevents pushing invalid branch names ✅ Blocks invalid branch creation ✅ Supports pre-push hook ✅ Supports pre-checkout hook ✅ 20+ supported branch naming patterns ✅ Easy installation and automatic setup

📦 Install

# Usage with NPM
npm install branch-name-validator

Flow

Once this package is installed, the scripts needed to validate the branch name automatically get saved inside the .git/hooks folder with the file names pre-push and pre-checkout. If these files are already present then the contents are appended to the existing files.

Supported Branch Naming Patterns

This extension enforces the following branch name formats:

| # | Type | Example | |----|------------|-----------------------------| | 1 | Feature | feature/login-ui | | 2 | Bug Fix | bugfix/issue-123 | | 3 | Hotfix | hotfix/critical-crash | | 4 | Release | release/v1.2.0 | | 5 | Experiment | experiment/new-model | | 6 | Docs | docs/api-documentation | | 7 | Refactor | refactor/database-queries | | 8 | Perf | perf/image-optimization | | 9 | Test | test/user-service-tests | | 10 | Chore | chore/dependency-updates | | 11 | CI | ci/github-actions-setup | | 12 | Build | build/webpack-config | | 13 | Style | style/css-formatting | | 14 | Revert | revert/login-feature | | 15 | Deps | deps/upgrade-lodash | | 16 | Config | config/eslint-rules |

The following standalone branch names are also allowed:

| # | Branch | |----|------------| | 17 | develop | | 18 | master | | 19 | main | | 20 | releases |

Branch Validator VS Code Extension

Download Branch Validator

Overview

Branch Validator is a VS Code extension that automatically validates Git branch names to ensure they follow a specific naming convention. The validation runs whenever you switch branches and before pushing changes.

Features

  • Automatic branch name validation when switching branches in VS Code
  • Prevents pushing from an invalid branch
  • Supports 20+ branch naming patterns:
    • feature/login-ui
    • bugfix/issue-123
    • hotfix/critical-crash
    • release/v1.2.0
    • experiment/new-model
    • docs/api-documentation
    • refactor/database-queries
    • perf/image-optimization
    • test/user-service-tests
    • chore/dependency-updates
    • ci/github-actions-setup
    • build/webpack-config
    • style/css-formatting
    • revert/login-feature
    • deps/upgrade-lodash
    • config/eslint-rules
    • develop, master, main, releases
  • Works seamlessly with VS Code’s built-in Git UI

Installation

  1. Open VS Code.
  2. Go to Extensions (Ctrl+Shift+X).
  3. Search for Branch Name Validator (or install manually by loading the extension).
  4. Click Install.
  5. Restart VS Code if needed.

Usage

  1. Open a Git repository in VS Code.
  2. Switch branches using the Git Bash.
  3. If the branch name is valid, a success message will appear.
  4. If the branch name is invalid, an error message will be displayed.
  5. The extension will also prevent pushing changes from an invalid branch.

How It Works

  • Real-time Validation: The extension listens for branch changes and validates them.
  • Push Interception: If the branch name is invalid, the push command is blocked.
  • Error Notifications: If an invalid branch name is detected, a notification appears in VS Code.

Made with ❤️ for better branch management!