{"id":13398081,"url":"https://github.com/conventional-changelog/commitlint","last_synced_at":"2026-03-12T11:13:08.192Z","repository":{"id":37422642,"uuid":"51575745","full_name":"conventional-changelog/commitlint","owner":"conventional-changelog","description":"📓 Lint commit messages","archived":false,"fork":false,"pushed_at":"2025-05-04T03:38:49.000Z","size":19031,"stargazers_count":17485,"open_issues_count":167,"forks_count":933,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-05-05T15:13:33.878Z","etag":null,"topics":["commit","conventions","git","lint"],"latest_commit_sha":null,"homepage":"https://commitlint.js.org","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/conventional-changelog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"license.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support/releases.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-12T08:37:56.000Z","updated_at":"2025-05-05T10:48:38.000Z","dependencies_parsed_at":"2022-07-14T07:00:40.325Z","dependency_job_id":"8ff2e1ee-5456-4a7e-b1d9-8420bc31c4fc","html_url":"https://github.com/conventional-changelog/commitlint","commit_stats":{"total_commits":2766,"total_committers":266,"mean_commits":"10.398496240601503","dds":0.5097613882863341,"last_synced_commit":"9be7624f5ef6ab9a1d76cf7f73575aa51119035d"},"previous_names":["marionebl/conventional-changelog-lint"],"tags_count":200,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conventional-changelog%2Fcommitlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conventional-changelog%2Fcommitlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conventional-changelog%2Fcommitlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conventional-changelog%2Fcommitlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conventional-changelog","download_url":"https://codeload.github.com/conventional-changelog/commitlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252522172,"owners_count":21761685,"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","conventions","git","lint"],"created_at":"2024-07-30T18:02:06.012Z","updated_at":"2026-03-12T11:13:08.176Z","avatar_url":"https://github.com/conventional-changelog.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","HarmonyOS","Uncategorized","Repository","What Inside","Tools","Linters","工程化相关","JavaScript","git","About the Package \u003ca id=\"about\"\u003e\u003c/a\u003e","🛠️ Developer Tools","Conventional Commits"],"sub_categories":["Windows Manager","Uncategorized","Linter \u0026 Formatter","Gitflow","Language Agnostic","Flaky Test Detection"],"readme":"# [Get Started](https://commitlint.js.org/guides/getting-started) | [Website](https://commitlint.js.org)\n\n\u003e Lint commit messages\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"600\" src=\"docs/public/assets/commitlint.svg\"\u003e\n\u003c/p\u003e\n\n\u003e Demo generated with [svg-term-cli](https://github.com/marionebl/svg-term-cli)\n\u003e\n\u003e `cat docs/assets/commitlint.json | svg-term --out docs/public/assets/commitlint.svg --frame --profile=Seti --height=20 --width=80`\n\n[![npm latest][2]][3] [![node compatibility][13]][14] [![Github Actions][4]][5]\n\n- 🚓 Be a good `commitizen`\n- 📦 Share configuration via `npm`\n- 🤖 Tap into `conventional-changelog`\n\n## Contents\n\n- [Get Started | Website](#get-started--website)\n  - [Contents](#contents)\n  - [What is commitlint](#what-is-commitlint)\n    - [Benefits of using commitlint](#benefits-of-using-commitlint)\n  - [Getting started](#getting-started)\n  - [CLI](#cli)\n  - [Config](#config)\n  - [Shared configuration](#shared-configuration)\n  - [Documentation](#documentation)\n  - [API](#api)\n  - [Tools](#tools)\n  - [Roadmap](#roadmap)\n  - [Version Support and Releases](#version-support-and-releases)\n    - [Releases](#releases)\n  - [Related projects](#related-projects)\n  - [License](#license)\n  - [Development](#development)\n    - [Install and run](#install-and-run)\n\n---\n\n## What is commitlint\n\ncommitlint checks if your commit messages meet the [conventional commit format](https://conventionalcommits.org).\n\nIn general the pattern mostly looks like this:\n\n```sh\ntype(scope?): subject  #scope is optional; multiple scopes are supported (current delimiter options: \"/\", \"\\\" and \",\")\n```\n\nReal world examples can look like this:\n\n```text\nchore: run tests on travis ci\n```\n\n```text\nfix(server): send cors headers\n```\n\n```text\nfeat(blog): add comment section\n```\n\nCommon types according to [commitlint-config-conventional (based on the Angular convention)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional#type-enum) can be:\n\n- build\n- chore\n- ci\n- docs\n- feat\n- fix\n- perf\n- refactor\n- revert\n- style\n- test\n\nThese can be modified by [your own configuration](#config).\n\n### Benefits of using commitlint\n\n- [Why Use Conventional Commits?](https://www.conventionalcommits.org/en/v1.0.0-beta.2/#why-use-conventional-commits)\n- [\"The perks of committing with conventions\" (Talk slides)](https://slides.com/marionebl/the-perks-of-committing-with-conventions#/)\n\n## Getting started\n\n- [Local setup](https://commitlint.js.org/guides/local-setup) - Lint messages on commit with husky\n- [CI setup](https://commitlint.js.org/guides/ci-setup) - Lint messages during CI builds\n\n## CLI\n\n- Primary way to interact with commitlint.\n- `npm install --save-dev @commitlint/cli`\n- Packages: [cli](./@commitlint/cli)\n\n## Config\n\n- Configuration is picked up from:\n  - `.commitlintrc`\n  - `.commitlintrc.json`\n  - `.commitlintrc.yaml`\n  - `.commitlintrc.yml`\n  - `.commitlintrc.js`\n  - `.commitlintrc.cjs`\n  - `.commitlintrc.mjs`\n  - `.commitlintrc.ts`\n  - `.commitlintrc.cts`\n  - `.commitlintrc.mts`\n  - `commitlint.config.js`\n  - `commitlint.config.cjs`\n  - `commitlint.config.mjs`\n  - `commitlint.config.ts`\n  - `commitlint.config.cts`\n  - `commitlint.config.mts`\n  - `commitlint` field in `package.json`\n  - `commitlint` field in [`package.yaml`](https://github.com/pnpm/pnpm/pull/1799)\n- Packages: [cli](./@commitlint/cli), [core](./@commitlint/core)\n- See [Rules](./docs/reference/rules.md) for a complete list of possible rules\n- An example configuration can be found at [@commitlint/config-conventional](./@commitlint/config-conventional/src/index.ts)\n\n### Important note about Node 24+\n\nNode v24 changes the way that modules are loaded, and this includes the commitlint config file. If your project does not contain a `package.json`, commitlint may fail to load the config, resulting in a `Please add rules to your commitlint.config.js` error message. This can be fixed by doing either of the following:\n\n- Add a `package.json` file, declaring your project as an ES6 module. This can be done easily by running `npm init es6`.\n- Rename the config file from `commitlint.config.js` to `commitlint.config.mjs`.\n\n## Shared configuration\n\nA number of shared configurations are available to install and use with `commitlint`:\n\n- [@commitlint/config-angular](./@commitlint/config-angular)\n- [@commitlint/config-conventional](./@commitlint/config-conventional)\n- [@commitlint/config-lerna-scopes](./@commitlint/config-lerna-scopes)\n- [@commitlint/config-nx-scopes](./@commitlint/config-nx-scopes)\n- [@commitlint/config-patternplate](./@commitlint/config-patternplate)\n- [@commitlint/config-workspace-scopes](./@commitlint/config-workspace-scopes)\n- [conventional-changelog-lint-config-atom](https://github.com/erikmueller/conventional-changelog-lint-config-atom)\n- [conventional-changelog-lint-config-canonical](https://github.com/gajus/conventional-changelog-lint-config-canonical)\n\n\u003e ⚠️ If you want to publish your own shareable config then make sure it has a name aligning with the pattern `commitlint-config-emoji-log` or `commitlint-config-your-config-name` — then in extend all you have to write is `emoji-log` or `your-config-name`.\n\n## Documentation\n\nCheck the [main website](https://commitlint.js.org/).\n\n## API\n\n- Alternative, programmatic way to interact with `commitlint`\n- Packages:\n  - [format](./@commitlint/format) - Format commitlint reports\n  - [lint](./@commitlint/lint) - Lint a string against commitlint rules\n  - [load](./@commitlint/load) - Load shared commitlint configuration\n  - [read](./@commitlint/read) - Read commit messages from a specified range or last edit\n- See [API](./docs/api) for a complete list of methods and examples\n\n## Tools\n\n- [commitizen adapter](./@commitlint/prompt)\n- [prompt](./@commitlint/prompt-cli)\n\n## Roadmap\n\n`commitlint` is considered stable and is used in various projects as a development tool.\n\n\u003e **Ideas**: [conventional-changelog/commitlint#94](https://github.com/conventional-changelog/commitlint/issues/94)\n\n## Version Support and Releases\n\n- Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `\u003e= 18`\n- git `\u003e= 2.13.2`\n\n### Releases\n\nSecurity patches will be applied to versions which are not yet EOL.\\\nFeatures will only be applied to the current main version.\n\n| Release                                                                          | Initial release |\n| -------------------------------------------------------------------------------- | --------------- |\n| [v19](https://github.com/conventional-changelog/commitlint/releases/tag/v19.0.0) | 02/2024         |\n| [v18](https://github.com/conventional-changelog/commitlint/releases/tag/v18.0.0) | 10/2023         |\n\nEOL is usually after around a year.\n\nWe're not a sponsored OSS project. Therefore we can't promise that we will release patch versions for older releases in a timely manner.\\\nIf you are stuck on an older version and need a security patch we're happy if you can provide a PR.\n\n## Related projects\n\n- [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)\n  Generate a changelog from conventional commit history\n- [commitizen](https://github.com/commitizen/cz-cli)\n  Simple commit conventions for internet citizens\n- [create-semantic-module](https://github.com/jlegrone/create-semantic-module)\n  CLI for quickly integrating commitizen and commitlint in new or existing projects\n\n## License\n\nCopyright by @marionebl. All `commitlint` packages are released under the MIT license.\n\n## Development\n\n`commitlint` is developed in a mono repository.\n\n### Install and run\n\n```sh\ngit clone git@github.com:conventional-changelog/commitlint.git\ncd commitlint\nyarn\nyarn run build # run build tasks\nyarn start # run tests, again on change\nyarn run commitlint # run CLI\n```\n\nFor more information on how to contribute please take a look at our [contribution guide](./.github/CONTRIBUTING.md).\n\n[0]: https://img.shields.io/badge/stability-stable-green.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/@commitlint/cli.svg?style=flat-square\n[3]: https://npmjs.org/package/@commitlint/cli\n[4]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml/badge.svg\n[5]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml\n[8]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[9]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[10]: https://img.shields.io/npm/v/@commitlint/cli/next.svg?style=flat-square\n[13]: https://img.shields.io/node/v/@commitlint/cli.svg\n[14]: https://nodejs.org/en/about/previous-releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconventional-changelog%2Fcommitlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconventional-changelog%2Fcommitlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconventional-changelog%2Fcommitlint/lists"}