JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q48009F
  • License MIT

A bundle of opinionated git hooks. All in one!

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zanminkian/git-hooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @zanminkian/git-hooks

    A bundle of opinionated git hooks. All in one!

    Feature

    • Easy to use. Just install it. It will lint your staged code and committed message automatically before git commit.
    • Zero Configs. Reasonable default settings for enterprise app.

    Usage

    Setup postinstall script in your package.json.

    {
      "scripts": {
        "postinstall": "git-hooks install"
      }
    }

    And then install it.

    pnpm add -D @zanminkian/git-hooks

    After that, @zanminkian/git-hooks will check your code and your commit message when you commit your code.

    How it works

    After running git-hooks install, it will write commit-msg file and pre-commit file to {PROJECT_ROOT}/.git/hooks directory.

    • The commit-msg file will lint your git commit message before git commit.
    • The pre-commit file will lint your staged code before git commit.

    License

    MIT