{"id":20268399,"url":"https://github.com/adriancarriger/semantic-commitlint","last_synced_at":"2025-07-14T22:32:51.627Z","repository":{"id":44842881,"uuid":"119293077","full_name":"adriancarriger/semantic-commitlint","owner":"adriancarriger","description":" 📦🚀 + 📓 A continuous integration build tool to ensure all new commits meet your commit message format! ️️","archived":false,"fork":false,"pushed_at":"2022-12-07T09:40:03.000Z","size":585,"stargazers_count":10,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T22:47:20.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adriancarriger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-28T20:03:56.000Z","updated_at":"2024-10-26T03:51:16.000Z","dependencies_parsed_at":"2023-01-24T15:31:22.421Z","dependency_job_id":null,"html_url":"https://github.com/adriancarriger/semantic-commitlint","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/adriancarriger/semantic-commitlint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriancarriger%2Fsemantic-commitlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriancarriger%2Fsemantic-commitlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriancarriger%2Fsemantic-commitlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriancarriger%2Fsemantic-commitlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adriancarriger","download_url":"https://codeload.github.com/adriancarriger/semantic-commitlint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriancarriger%2Fsemantic-commitlint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265360211,"owners_count":23752649,"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":[],"created_at":"2024-11-14T12:18:14.101Z","updated_at":"2025-07-14T22:32:51.606Z","avatar_url":"https://github.com/adriancarriger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic Commitlint [![npm version](https://badge.fury.io/js/semantic-commitlint.svg)](https://badge.fury.io/js/semantic-commitlint)\n\n📦🚀 + 📓 A continuous integration build tool to ensure all new commits meet your commit message format!\n️️\n\n[![Build Status](https://img.shields.io/circleci/project/github/adriancarriger/semantic-commitlint/master.svg?maxAge=60)](https://circleci.com/gh/adriancarriger/semantic-commitlint)\n[![Dependency Status](https://img.shields.io/david/adriancarriger/semantic-commitlint.svg?maxAge=60)](https://david-dm.org/adriancarriger/semantic-commitlint)\n[![devDependency Status](https://img.shields.io/david/dev/adriancarriger/semantic-commitlint.svg?maxAge=60)](https://david-dm.org/adriancarriger/semantic-commitlint?type=dev)\n[![Downloads per month](https://img.shields.io/npm/dm/semantic-commitlint.svg)](https://www.npmjs.com/package/semantic-commitlint)\n\n## Problem\n\n* [📦🚀 semantic-release](https://github.com/semantic-release/semantic-release) depends on properly formatted commit messages\n* [📓 commitlint](https://github.com/marionebl/commitlint) is awesome, but it doesn't know which commits occurred since your last release\n\n## Solution\n\n* [semantic-commitlint](https://github.com/adriancarriger/semantic-commitlint) fills the gap between semantic-release and commitlint by asking commitlint to lint new commit messages that have not been included in a previous release\n\n## Features\n\n* Run in CI on all branches to ensure that only builds with valid commit messages pass\n* Wraps [semantic-release](https://github.com/semantic-release/semantic-release) and [commitlint](https://github.com/marionebl/commitlint) for an easy install\n* Minimal config\n\n## Install\n\n```bash\nnpm install semantic-commitlint --save-dev\n```\n\n## Setup\n\nAdd the following to your `package.json`\n\n```json\n{\n  \"scripts\": {\n    \"semantic-commitlint\": \"semantic-commitlint\",\n    \"semantic-release\": \"semantic-release\"\n  },\n  \"release\": {\n    \"verifyRelease\": [\"semantic-commitlint\"]\n  }\n}\n```\n\nSetup [semantic-release authentication](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/ci-configuration.md#ci-configuration) for CI\n\n## Usage\n\nAdd the following commands to your CI build process\n\n```bash\nnpm run semantic-commitlint -- --ci\nnpm run semantic-release\n```\n\n## Local usage\n\nTo get early feedback on commit messages you can add the following to a commit hook or your regular set of tests.\n\n```bash\nnpm run semantic-commitlint\n```\n\nThis allows your project's contributors to get early feedback on their last commit message instead of waiting for CI to fail a build.\n\n* **Last commit only** - this will not validate all new commit messages because Github auth is required to gather commits that have been added since the last release.\n\n## Config\n\n### Skip commits\n\nIf there are unreleased commits that shouldn't fail a build, then add them to your `package.json` inside the `semanticCommitlint` config.\n\n```json\n{\n  \"semanticCommitlint\": {\n    \"skipCommits\": [\"a1be371\"]\n  }\n}\n```\n\n### Custom lint functions\n\nTo add a custom lint function add your function's path in `package.json`.\n\n```json\n{\n  \"semanticCommitlint\": {\n    \"lintFunctions\": [\"./my-function.js\"]\n  }\n}\n```\n\nThe function itself works like this:\n\n```js\n// my-function.js\nfunction customValidation(commitMessage, report) {\n  if (commitMessage.includes('something bad')) {\n    report.valid = false;\n    report.errors.push({\n      level: 2,\n      valid: false,\n      name: 'type-bad',\n      message: 'Commit message should have been better!'\n    });\n  }\n}\n\nmodule.exports = customValidation;\n```\n\n## External config\n\nThis project just ties together some functionality from two external projects. For all other config options make sure to read through the docs.\n\n* [📦🚀 semantic-release](https://github.com/semantic-release/semantic-release)\n* [📓 commitlint](https://github.com/marionebl/commitlint)\n\n## Commit hooks\n\nYou can prevent invalid commit messages from every being created by using [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)!\n\n* Add [husky](https://github.com/typicode/husky)\n\n```bash\nnpm install --save-dev husky@next\n```\n\n* Update `package.json`\n\n```json\n{\n  \"husky\": {\n    \"hooks\": {\n      \"prepare-commit-msg\": \"npm run semantic-commitlint -- -h\"\n    }\n  }\n}\n```\n\n## Issues\n\nNot all features implemented in semantic-release and commitlint are currently available when using semantic-commtlint. If you have a suggestion, please [open an issue](https://github.com/adriancarriger/semantic-commitlint/issues/new). Thanks!\n\n## License\n\nsemantic-commitlint is licensed under the MIT Open Source license.\nFor more information, see the [LICENSE](LICENSE) file in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriancarriger%2Fsemantic-commitlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadriancarriger%2Fsemantic-commitlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriancarriger%2Fsemantic-commitlint/lists"}