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

@eigenspace/commit-linter

v0.0.22-dev

Published

Doesn't allow developers push changes if commit message doesn't correspond rules. This is an alternative for [commitint](https://commitlint.js.org/). The main difference from current library is that it fully bases on [conventionalcommits.org](https://www

Downloads

92

Readme

Commit Linter

Doesn't allow developers push changes if commit message doesn't correspond rules. This is an alternative for commitint. The main difference from current library is that it fully bases on conventionalcommits.org.

This library based on this rule by default:

<issue prefix> <module 1>[/<sub-module>][, ..., <module N>[/<sub-module>]]: <content in past tense 1>[, 
..., <content in paste tense M>][; ...; <moduleK>[/<sub-module>]: <content in past tense>]

But you can also set your own commit messages style.

Example of commit with single changes:
TAX-20 header: added navigation bar

Example of commit with multiple changes:
TAX-20 product/feedbacks: added the ability to set stars; user: supported history

Environmental requirements

  • husky: 1.3.x

Quickstart

  1. Install plugin here:
    yarn add @eigenspace/commit-linter --dev

    or

    npm install @eigenspace/commit-linter --dev

  2. Just add this for your husky hooks in package.json:

    ...
    "husky": {
        "hooks": {
            ...
            "commit-msg": "commit-linter --message=COMMIT_MESSAGE"
            ...
        }
    }
    ...
  3. Add .commit-linter.config.json in the root of your project and set your issue prefixes:

    {
        "extends": "./node_modules/@eigenspace/commit-linter/.commit-linter.base.config.json",
        "issuePrefixes": [
            "TAX-[\d]+"
        ]
    }

Configuration

All configuration are in .commit-linter.config.json file:

extends

You can set file you want to extend from:

"extends": ".commit-linter.base.config.json",

body

For single change:
<task prefix> <content>

For multiple changes:
<task prefix> <content 1>; <content 2>; <content N>

For instance, you can override by your own regexp for commit body:

"body": "^([a-z\\/,\\- ]+?): (([a-z]+?ed|set|reset|draft) [a-z A-Z 0-9,]+)$",

issuePrefixes

It's like what your commit can start with. For instance, #28, feature/cart, DXAPP-124 and so on.

Example of config:

"issuePrefixes": ["microfix", "TAX-[0-9]+"],

ignore

You can set regex to ignore linting messages. For instance, it could be:
Merge dev in master or auto/ci: set version to 4.1.1.

Default config is:

"ignore": ["^Merge .*", "^auto/.*"]

linkToRule

This is a reference to page with rule description. By default there is a:

"linkToRule": "https://github.com/eigen-space/codestyle/tree/dev/doc/common#512-сообщение-к-изменению"

Why do we have that dependencies?

  • @eigenspace/argument-parser - parsing arguments from node process.

Why do we have that dev dependencies?

  • @types/* - contains type definitions for specific library.
  • @eigenspace/eslint-config-codestyle - project with eslint config files.
  • @eigenspace/helper-scripts - common scripts for dev. environment.
  • eslint - it checks code for readability, maintainability, and functionality errors.
  • @eigenspace/codestyle - includes lint rules, config for typescript.
  • husky - used for configure git hooks.
  • ts-jest - it lets you use Jest to test projects written in TypeScript.
  • jest - testing.
  • lint-staged - used for configure linters against staged git files.
  • typescript - is a superset of JavaScript that have static type-checking and ECMAScript features.