{"id":15703865,"url":"https://github.com/alan-agius4/speedy-commit-msg-hook","last_synced_at":"2025-05-08T20:35:45.988Z","repository":{"id":19079382,"uuid":"85982018","full_name":"alan-agius4/speedy-commit-msg-hook","owner":"alan-agius4","description":"Git commit message hook","archived":false,"fork":false,"pushed_at":"2022-06-22T05:15:34.000Z","size":174,"stargazers_count":6,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T04:35:01.243Z","etag":null,"topics":["commit","commit-conventions","commit-hooks","commit-message","commit-msg","conventions","git","hook","hooks","standards"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/alan-agius4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-23T18:05:40.000Z","updated_at":"2020-06-13T22:40:46.000Z","dependencies_parsed_at":"2022-09-09T23:21:49.458Z","dependency_job_id":null,"html_url":"https://github.com/alan-agius4/speedy-commit-msg-hook","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-agius4%2Fspeedy-commit-msg-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-agius4%2Fspeedy-commit-msg-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-agius4%2Fspeedy-commit-msg-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-agius4%2Fspeedy-commit-msg-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alan-agius4","download_url":"https://codeload.github.com/alan-agius4/speedy-commit-msg-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253017076,"owners_count":21840894,"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":["commit","commit-conventions","commit-hooks","commit-message","commit-msg","conventions","git","hook","hooks","standards"],"created_at":"2024-10-03T20:07:24.980Z","updated_at":"2025-05-08T20:35:45.948Z","avatar_url":"https://github.com/alan-agius4.png","language":"TypeScript","readme":"# @speedy/commit-msg-hook\n[![CircleCI](https://circleci.com/gh/alan-agius4/speedy-commit-msg-hook.svg?style=shield)](https://circleci.com/gh/alan-agius4/speedy-commit-msg-hook)\n[![npm version](https://img.shields.io/npm/v/@speedy/commit-msg-hook.svg)](https://www.npmjs.com/package/@speedy/commit-msg-hook)\n[![dependencies Status](https://david-dm.org/alan-agius4/speedy-commit-msg-hook/status.svg)](https://david-dm.org/alan-agius4/speedy-commit-msg-hook)\n[![devDependencies Status](https://david-dm.org/alan-agius4/speedy-commit-msg-hook/dev-status.svg)](https://david-dm.org/alan-agius4/speedy-commit-msg-hook?type=dev)\n\nA highly customizable git commit message hook. Validates a commit message against a set of configuration, based on the [`Conventional Changelog`](https://github.com/conventional-changelog/conventional-changelog) standards. \n\nCommit first line format:\n```txt\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n```\n\n## Installation\n\n```\nnpm install @speedy/commit-msg-hook --save-dev\n```\n\n## Rules\n\nThe majority of the rules can be applied in any part of the configuration.\n\n| Name               | Description                                                                                            | Type     | Section |\n|--------------------|--------------------------------------------------------------------------------------------------------|----------|---------|\n| `no-unscoped`      | Disallows unscoped commit messages                                                                     | boolean  | Message |\n| `skip-validation`  | Disable validation for commit messages matching a RegExp. Useful for `Merge` and `Revert` commits)     | RegExp   | Message |\n| `valid-types`      | An array of allowed commit message types ex: `[\"feat\", \"chore\"]`                                       | string[] | Type    |\n| `valid-scopes`     | An array of allowed commit message scopes ex: `[\"router\", \"platform\"]` (Case sensitive)                | string[] | Scope   |\n| `banned-phrases`   | An array of disallowed phrases. (Case insensitive)                                                     | string[] | All     |\n| `max-length`       | Requires text to be under a certain max length                                                         | number   | All     |\n| `no-dash`          | Disallows dashes                                                                                       | boolean  | All     |\n| `no-space`         | Disallows spaces                                                                                       | boolean  | All     |\n| `no-underscore`    | Disallows underscores                                                                                  | boolean  | All     |\n| `no-camel-case`    | Disallows camel cases                                                                                  | boolean  | All     |\n| `no-kebab-case`    | Disallows kebab case                                                                                   | boolean  | All     |\n| `no-upper-first`   | Enforces first character to be lower case                                                              | boolean  | All     |\n| `no-lower-first`   | Enforces first character to be upper case                                                              | boolean  | All     |\n| `no-period-at-end` | Enforces last character not to be a period                                                             | boolean  | All     |\n\n## Configuration\n\nBy default, will try to locate the `speedy-commit-msg.json` file in the root of your project folder.\n\nIf the file is not found it will fallback to an internal `speedy-commit-msg.json` found in `config` folder.\n\n### Default rules\n\n[speedy-commit-msg.json](https://github.com/alan-agius4/speedy-commit-msg-hook/blob/master/config/speedy-commit-msg.json).\n\n```json\n{\n  \"rules\": {\n    \"message\": {\n      \"skip-validation\": \"^(Merge)\\\\s\",\n      \"max-length\": 100,\n      \"banned-phrases\": [\n        \"minor change\",\n        \"minor fix\",\n        \"minor refactor\",\n        \"pr change\",\n        \"pr comment\",\n        \"following pr\"\n      ],\n      \"no-period-at-end\": true,\n      \"no-upper-first\": true\n    },\n    \"type\": {\n      \"valid-types\": [\n        \"feat\",\n        \"fix\",\n        \"docs\",\n        \"style\",\n        \"refactor\",\n        \"perf\",\n        \"test\",\n        \"chore\",\n        \"revert\"\n      ]\n    },\n    \"scope\": {\n      \"no-dash\": true,\n      \"no-underscore\": true\n    },\n    \"subject\": {\n      \"no-period-at-end\": true,\n      \"no-upper-first\": true\n    }\n  }\n}\n```\n\n### extends\nConfiguration can be extended with one or many existing configurations.\n\n```json\n{\n  \"extends\": [\n    \"@speedy/commit-msg-hook:latest\"\n  ],\n  \"rules\": {\n    \"message\": {\n      \"no-unscoped\": true\n    },\n    \"scope\": {\n      \"no-dash\": false\n    }\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-agius4%2Fspeedy-commit-msg-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan-agius4%2Fspeedy-commit-msg-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-agius4%2Fspeedy-commit-msg-hook/lists"}