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

lint-my-commit

v1.1.0

Published

Lightweight package in order to lint commit messages based on configurable rules

Readme

lint-my-commit

Lightweight package in order to lint commit messages based on configurable rules

Main features

  • It has zero dependencies on other projects.
  • It is extremely lightweight (just one small main executable .js file).
  • It can be used as part of commit-msg git hook.
  • Linting rules are purely based on regular expressions, which allows a great level of customization and flexibility (any pattern can be validated).

Execution

In order to validate a commit message against a set of rules:

npx lint-my-commit <path-to-commit-msg-file> <path-to-linter-rules-json-file>

Where:

  • <path-to-commit-msg-file>: Normally, .git/COMMIT_EDITMSG, but it could be any file containing text that must be checked.
  • <path-to-linter-rules-json-file>: Any .json file containing any (or all) the rules mentioned below.

Rules configurable through .json file

This file can be named as desired, the only two conditions that must meet are:

  • It should contain a valid JSON object.
  • It should be reachable by the executable.

Three regular expressions can be provided, one for each section of the commit (more about them in the next point), but none of them are mandatory, meaning that certain (or all) sections of the commit can be free of any form of validation.

Additional key-value pairs specified in this configuration file will be ignored by the program.

{
  "subjectPattern": "^subject_regex$",
  "bodyPattern": "^body_regex$",
  "footerPattern": "^footer_regex$"
}

These regular expresions are checked against each line of each section.

The only lines that are completely ignored by the linter are the blank lines belonging to the footer section.

Commit structure

lint-my-commit assumes the following commit structure for all commits:

<subject> (Mandatory)

<body> (Optional)

<footer> (Optional)

Which is adaptable to almost every commit convention currently in use.

Predefined rules and assumptions

  1. Commit must always at least include a subject.
  2. Subject and body must be separated by at least one blank line.
  3. Footer starts immediately with the first blank line after the body (this first blank line is considered a part of the footer).
  4. Footer blank lines are completely ignored.

License

MIT