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

vite-plus-commitlint

v1.1.3

Published

Unified Commitlint plugin and CLI for Vite+

Readme

vite-plus-commitlint ⚡

Unified Commitlint plugin and CLI for Vite+ toolchain. Zero configuration, built-in Conventional Commits ruleset, native Git hooks, and dev server middleware.

License: MIT Vite+ Node.js Version


Features

  • 🚀 Zero-Config Conventional Commits: Comes pre-configured with conventional commit rules (feat, fix, docs, refactor, chore, etc.).
  • 🛠 Unified Package: Replaces legacy 30+ @commitlint/* packages with a single, high-performance ESM library.
  • ⚡ Vite+ Native Integration: Works directly in vite.config.ts via defineConfig from vite-plus.
  • 🪝 Git Hook Dispatcher: Integrates seamlessly with Vite+ native hooks (.vite-hooks/commit-msg) and vp staged.
  • 💻 CLI Parity: Full feature parity with standard commitlint flags (--edit, --from, --to, --last, --strict, --print-config).
  • 🌐 Dev Server Endpoint: Exposes real-time commit message validation middleware (POST /__commitlint/validate) for IDE extensions and UIs.

Installation

Install using Vite+:

vp add -D vite-plus-commitlint

Quick Start

1. Register Plugin in vite.config.ts

import { defineConfig } from "vite-plus";
import { commitlint } from "vite-plus-commitlint";

export default defineConfig({
  plugins: [
    commitlint({
      // Zero-config defaults to conventional commits rules!
      // Optional overrides:
      rules: {
        "header-max-length": [2, "always", 100],
      },
    }),
  ],
  staged: {
    COMMIT_EDITMSG: "vp exec vite-plus-commitlint --edit",
  },
});

2. Configure Git Commit Hook

Set up Vite+ Git hook dispatcher:

vp config

In .vite-hooks/commit-msg:

#!/bin/sh
vp exec vite-plus-commitlint --edit "$1"

CLI Usage

Run via vp exec or vpx:

# Lint last commit message file
vp exec vite-plus-commitlint --edit

# Print resolved configuration as JSON
vp exec vite-plus-commitlint --print-config json

# Lint commit range from git history
vp exec vite-plus-commitlint --from HEAD~3 --to HEAD

# Run in strict mode (exit code 1 for errors, 2 for warnings)
vp exec vite-plus-commitlint --edit --strict

Programmatic API

import { lintCommit, parseCommit, conventionalPreset, rules } from "vite-plus-commitlint";

// Parse a commit message
const parsed = parseCommit("feat(ui): add new button component");
console.log(parsed.type); // 'feat'
console.log(parsed.scope); // 'ui'

// Lint a commit message against rules
const report = lintCommit("fix: resolve alignment");
console.log(report.valid); // true

License

MIT © Brandon Hubbard