@leanup/git-hooks

    1.2.1 • Public • Published

    GitHub CI - Publish to NPM dependencies vulnerabilities npm downloads install-size lernajs code style: prettier

    @leanup/git-hooks

    This module contains some nice tools to organize git hooks for NodeJs projects.

    Installation

    npm install @leanup/git-hooks --save-dev

    Configuration

    Add the following configuration to you package.json:

    {
      ...
      "husky": {
        "hooks": {
          "pre-commit": "lint-staged",
          "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
        }
      },
      "lint-staged": {
        "{src,tests}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}": [
          "eslint"
        ],
        "{src,tests}/**": [
          "prettier --check"
        ]
      },
      ...
    }

    After that create a commitlint configuration file commitlint.config.js in your project folder and insert the following code:

    module.exports = require('@leanup/git-hooks/commitlint.config');

    References

    Install

    npm i @leanup/git-hooks

    Homepage

    leanupjs.org

    DownloadsWeekly Downloads

    3,286

    Version

    1.2.1

    License

    Apache-2.0

    Unpacked Size

    3.48 kB

    Total Files

    4

    Last publish

    Collaborators

    • m.oppitz