{"id":18254263,"url":"https://github.com/brikcss/git-hooks","last_synced_at":"2026-04-29T06:35:36.157Z","repository":{"id":143745460,"uuid":"126294565","full_name":"brikcss/git-hooks","owner":"brikcss","description":"Useful git hooks to make developers' lives easier. Includes a pre-commit linter, a commit message branch stamper, and a pre-push stage checker (all optional).","archived":false,"fork":false,"pushed_at":"2020-05-29T04:25:45.000Z","size":782,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T05:46:34.566Z","etag":null,"topics":["git-hooks","husky","prettier","standard-js","stylelint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brikcss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-22T07:12:22.000Z","updated_at":"2020-12-07T00:46:09.000Z","dependencies_parsed_at":"2023-07-03T01:18:44.758Z","dependency_job_id":null,"html_url":"https://github.com/brikcss/git-hooks","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikcss%2Fgit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikcss%2Fgit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikcss%2Fgit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikcss%2Fgit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brikcss","download_url":"https://codeload.github.com/brikcss/git-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247934808,"owners_count":21020724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git-hooks","husky","prettier","standard-js","stylelint"],"created_at":"2024-11-05T10:11:18.833Z","updated_at":"2026-04-29T06:35:36.128Z","avatar_url":"https://github.com/brikcss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Hooks\n\n\u003e Set of useful Git hooks to make developer's lives easier.\n\n\u003c!-- Shields. --\u003e\n\u003cp\u003e\n    \u003c!-- NPM version. --\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@brikcss/git-hooks\"\u003e\u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/git-hooks.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- NPM downloads/month. --\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@brikcss/git-hooks\"\u003e\u003cimg alt=\"NPM downloads per month\" src=\"https://img.shields.io/npm/dm/@brikcss/git-hooks.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- Travis branch. --\u003e\n    \u003ca href=\"https://github.com/brikcss/git-hooks/tree/master\"\u003e\u003cimg alt=\"Travis branch\" src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square\u0026label=master\"\u003e\u003c/a\u003e\n    \u003c!-- Codacy. --\u003e\n    \u003ca href=\"https://www.codacy.com/app/thezimmee/git-hooks\"\u003e\u003cimg alt=\"NPM version\" src=\"https://img.shields.io/codacy/grade/93e2defdeec749f9bc3fa94100a023e5/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- \u003ca href=\"https://www.codacy.com/app/thezimmee/git-hooks\"\u003e\u003cimg alt=\"Codacy code coverage\" src=\"https://img.shields.io/codacy/coverage/93e2defdeec749f9bc3fa94100a023e5/master.svg?style=flat-square\"\u003e\u003c/a\u003e --\u003e\n    \u003c!-- Coveralls --\u003e\n    \u003c!-- \u003ca href='https://coveralls.io/github/brikcss/git-hooks?branch=master'\u003e\u003cimg src='https://img.shields.io/coveralls/github/brikcss/git-hooks/master.svg?style=flat-square' alt='Coverage Status' /\u003e\u003c/a\u003e --\u003e\n     \u003c!-- Standard JS code style. --\u003e\n    \u003ca href=\"https://standardjs.com\"\u003e\u003cimg alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- Prettier code style. --\u003e\n    \u003ca href=\"https://prettier.io/\"\u003e\u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- Semantic release. --\u003e\n    \u003ca href=\"https://github.com/semantic-release/semantic-release\"\u003e\u003cimg alt=\"semantic release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- Commitizen friendly. --\u003e\n    \u003ca href=\"http://commitizen.github.io/cz-cli/\"\u003e\u003cimg alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- MIT License. --\u003e\n    \u003ca href=\"https://choosealicense.com/licenses/mit/\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/npm/l/express.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003c!-- Greenkeeper. --\u003e\n    \u003ca href=\"https://greenkeeper.io/\"\u003e\u003cimg src=\"https://badges.greenkeeper.io/brikcss/git-hooks.svg?style=flat-square\" alt=\"Greenkeeper badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Environment support\n\n| Node | CLI | UMD | Browser |\n| :--- | :-: | :-- | :------ |\n| 𐄂    |  ✔  | 𐄂   | 𐄂       |\n\n## Install\n\n```sh\nnpm install -D @brikcss/git-hooks\n```\n\n## Setup\n\n1.  Configure `.lintstagedrc.js` to run your desired linters and formatters. See [lint-staged documentation](https://www.npmjs.com/package/lint-staged).\n2.  Configure `.huskyrc.js` to run your desired git hooks. See [husky documentation](https://github.com/typicode/husky). For example:\n    ```js\n    module.exports = {\n      hooks: {\n        'pre-commit': 'lint-staged',\n        'commit-msg':\n          'commitlint -e $HUSKY_GIT_PARAMS \u0026\u0026 . ./node_modules/.bin/commit-msg-stamp-branch $HUSKY_GIT_PARAMS',\n        'pre-push': '. ./node_modules/.bin/pre-push-check-stage \u0026\u0026 echo \"\\n[ok] Pushing code...\"',\n      },\n    };\n    ```\n\n### lint-staged\n\nlint-staged allows you to easily lint and format _staged files_. This negates the need to lint files during a watch/build process. See [lint-staged documentation](https://www.npmjs.com/package/lint-staged) for configuration options.\n\n### `commit-msg-stamp-branch`\n\nThis hook appends the source branch name to the commit message. No configuration necessary, just add to husky's configuration as shown above.\n\n### `pre-push-check-stage`\n\nThis hook ensures stage is not \"dirty\" prior to running `git push`. No configuration necessary, just add to husky's configuration as shown above.\n\n### `github-zip`\n\nThis hook is intended for use with [Travis](http://travis-ci.org) or similar continuous integration build tools. It grabs files recently published to NPM and compresses them into both a `.zip` and `.tgz` file. This allows you to release the same exact files to GitHub as were released on NPM.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikcss%2Fgit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrikcss%2Fgit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikcss%2Fgit-hooks/lists"}