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 🙏

© 2024 – Pkg Stats / Ryan Hefner

commit-lint-generator

v1.3.3

Published

Commit Lint Generator is a versatile tool designed to enforce commit message guidelines within your development team.

Downloads

151

Readme

Construct your team's commit rules through Javascript.

Read this in other languages: 繁體中文

Description

Commit Lint Generator is a tool designed for inspecting commits. It takes a commitlintrc.js file as configuration, which defines hooks and various rules. You can specify the rule needed for inspection based on a particular hook. All available rules can be found at commitlint. For currently supported rules, refer to the Support rules section. Support for additional rules will be gradually added.

Features

  • Checks commit formats based on configured rules.
  • Supports multilingual error messages.
  • Complies with most POSIX standards.
  • Supports any platform.

Pre-prepare

Define rules You can define your team's commit standards in commitlintrc.js.
commitlintrc.js exports an array named config, containing rules specified for each hook.

The structure is defined as follows:

export const config = [
  {
    hook: "the hook that triggers",
    lang: "en_us",
    rules: [
      {
        name: "rule name",
        level: "0 ignore, 1 yellow text, 2 red text",
        applicable: "always | never when choosing never, it means to reverse the rule",
        value: "rule value"
      },
      {
        name: "header-max-length",
        level: 2,
        applicable: "always",
        value: 10
      },
      // other rules...
    ]
  }
]

Usage 1 (no env)

Generate lint

Using Docker and mounting the project's .git and commitlintrc.js.

docker run --rm -v $(pwd)/.git:/app/.git -v $(pwd)/commitlintrc.js:/app/commitlintrc.js leo03164/commitlint-generator

Usage 2 (node.js)

1. Install nodejs

If you do not have nodejs installed, please install it first. Version information: nodejs > 16.13.0

2. Install required packages

npm i -g commit-lint-generator

3. Direct use

commitlint-generator

Support rules

Parser

  • [x] body-leading-blank

Header

  • [x] header-case
  • [x] header-full-stop
  • [x] header-max-length
  • [x] header-min-length
  • [x] header-trim

Type

  • [x] type-enum
  • [x] type-case

Body

  • [x] body-full-stop
  • [x] body-empty
  • [x] body-max-length
  • [x] body-max-line-length
  • [x] body-min-length
  • [x] body-case

Footer

  • [x] footer-empty
  • [x] footer-max-length
  • [x] footer-max-line-length
  • [x] footer-min-length

Donation

  • Ko-fi: Donate with Ko-fi
  • Buy Me a Coffee: Donate with Buy Me a Coffee