{"id":19584826,"url":"https://github.com/flex-development/commitlint-config","last_synced_at":"2026-02-24T02:02:01.704Z","repository":{"id":92712426,"uuid":"604865849","full_name":"flex-development/commitlint-config","owner":"flex-development","description":"Shareable commitlint config enforcing conventional commit","archived":false,"fork":false,"pushed_at":"2024-06-13T04:32:29.000Z","size":1433,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T09:45:39.576Z","etag":null,"topics":["cjs","commitlint","commitlint-config","conventional-changelog","conventional-commits-parser","esm","hybrid","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/flex-development/commitlint-config","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["flex-development"]}},"created_at":"2023-02-22T00:22:53.000Z","updated_at":"2023-06-12T05:17:50.000Z","dependencies_parsed_at":"2024-04-25T05:45:34.784Z","dependency_job_id":null,"html_url":"https://github.com/flex-development/commitlint-config","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":0.3205128205128205,"last_synced_commit":"8b02e3a2de4b8e4600ced5c7373d43a600998a2a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/flex-development/commitlint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fcommitlint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fcommitlint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fcommitlint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fcommitlint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/commitlint-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fcommitlint-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29768332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T01:40:24.820Z","status":"online","status_checked_at":"2026-02-24T02:00:07.497Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cjs","commitlint","commitlint-config","conventional-changelog","conventional-commits-parser","esm","hybrid","typescript"],"created_at":"2024-11-11T07:49:59.539Z","updated_at":"2026-02-24T02:02:01.665Z","avatar_url":"https://github.com/flex-development.png","language":"TypeScript","funding_links":["https://github.com/sponsors/flex-development"],"categories":[],"sub_categories":[],"readme":"# commitlint-config\n\n[![github release](https://img.shields.io/github/v/release/flex-development/commitlint-config.svg?include_prereleases\u0026sort=semver)](https://github.com/flex-development/commitlint-config/releases/latest)\n[![npm](https://img.shields.io/npm/v/@flex-development/commitlint-config.svg)](https://npmjs.com/package/@flex-development/commitlint-config)\n[![codecov](https://codecov.io/gh/flex-development/commitlint-config/branch/main/graph/badge.svg?token=hJhCIS5UIM)](https://codecov.io/gh/flex-development/commitlint-config)\n[![module type: cjs+esm](https://img.shields.io/badge/module%20type-cjs%2Besm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)\n[![license](https://img.shields.io/github/license/flex-development/commitlint-config.svg)](LICENSE.md)\n[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits\u0026logoColor=ffffff)](https://conventionalcommits.org/)\n[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript\u0026logoColor=ffffff)](https://typescriptlang.org/)\n[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat\u0026logo=vitest\u0026logoColor=ffffff)](https://vitest.dev/)\n[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat\u0026logo=yarn\u0026logoColor=ffffff)](https://yarnpkg.com/)\n\nShareable [`commitlint`][1] config enforcing [conventional commits][2]\n\n## Contents\n\n- [What is this?](#what-is-this)\n- [When should I use this?](#when-should-i-use-this)\n- [Install](#install)\n- [Use](#use)\n  - [Customizing scopes and types](#customizing-scopes-and-types)\n- [Rules](#rules)\n  - [Problems](#problems)\n    - [`body-full-stop`](#body-full-stop)\n    - [`body-leading-blank`](#body-leading-blank)\n    - [`body-max-length`](#body-max-length)\n    - [`body-max-line-length`](#body-max-line-length)\n    - [`footer-leading-blank`](#footer-leading-blank)\n    - [`footer-max-length`](#footer-max-length)\n    - [`footer-max-line-length`](#footer-max-line-length)\n    - [`header-full-stop`](#header-full-stop)\n    - [`header-max-length`](#header-max-length)\n    - [`scope-case`](#scope-case)\n    - [`scope-enum`](#scope-enum)\n    - [`scope-max-length`](#scope-max-length)\n    - [`scope-min-length`](#scope-min-length)\n    - [`subject-empty`](#subject-empty)\n    - [`subject-full-stop`](#subject-full-stop)\n    - [`subject-min-length`](#subject-min-length)\n    - [`trailer-exists`](#trailer-exists)\n    - [`type-case`](#type-case)\n    - [`type-empty`](#type-empty)\n    - [`type-enum`](#type-enum)\n    - [`type-max-length`](#type-max-length)\n    - [`type-min-length`](#type-min-length)\n- [API](#api)\n  - [`config`](#config)\n  - `defaultIgnores`\n  - `formatter`\n  - `helpUrl`\n  - `ignores`\n  - [`max(array)`](#maxarray)\n  - [`min(array)`](#minarray)\n  - `parserPreset`\n  - `plugins`\n  - `prompt`\n  - `rules`\n  - [`scopes([extras])`](#scopesextras)\n  - [`types([extras])`](#typesextras)\n- [Types](#types)\n  - [Enums](#enums)\n  - [Interfaces](#interfaces)\n  - [Type Definitions](#type-definitions)\n- [Contribute](#contribute)\n\n## What is this?\n\nThis package exports a shareable [`commitlint`][1] configuration that enforces [conventional commits][2].\n\nIt also includes a set of utilities for customizing rules.\n\n## When should I use this?\n\nThis package can be used with [`@commitlint/cli`][3] and [`@commitlint/prompt-cli`][4].\n\nCommit parsing options can also be used with [`conventional-changelog`][5] and [`conventional-commits-parser`][6].\n\n## Install\n\n```sh\nyarn add -D @flex-development/commitlint-config @commitlint/cli\n```\n\nFrom Git:\n\n```sh\nyarn add -D @flex-development/commitlint-config@flex-development/commitlint-config @commitlint/cli\n```\n\n\u003cblockquote\u003e\n  \u003csmall\u003e\n    See \u003ca href='https://yarnpkg.com/features/protocols#git'\u003eGit - Protocols | Yarn\u003c/a\u003e\n    \u0026nbsp;for details on requesting a specific branch, commit, or tag.\n  \u003c/small\u003e\n\u003c/blockquote\u003e\n\n## Use\n\n```sh\necho '{\\n  \"extends\": \"@flex-development\"\\n}' \u003e .commitlintrc.json\ncommitlint --from HEAD~1 --to HEAD --verbose\n```\n\n### Customizing scopes and types\n\nDue to [an unresolved `commitlint` issue][7], extended `commitlint` configurations do not concatenate [`scope-enum`][8],\nnor [`type-enum`][9]. Follow the example below to customize commit scopes and types losslessly.\n\n```sh\ntouch .commitlintrc.cts\n```\n\n```ts\n/**\n * @file Configuration - commitlint\n * @module config/commitlint\n * @see https://commitlint.js.org\n */\n\nimport {\n  RuleConfigSeverity as Severity,\n  type UserConfig\n} from '@commitlint/types'\nimport { scopes } from '@flex-development/commitlint-config'\n\n/**\n * `commitlint` configuration object.\n *\n * @const {UserConfig} config\n */\nconst config: UserConfig = {\n  extends: ['@flex-development'],\n  rules: {\n    'scope-enum': [Severity.Error, 'always', scopes(['bundle', 'transpile'])]\n  }\n}\n\nexport default config\n```\n\nYou may need to set [`TS_NODE_PROJECT`][10] if running `commitlint` from the command line.\n\nSee [`docs/examples/commitlint.config.cjs`](docs/examples/commitlint.config.cjs) for an example config written in pure CommonJS.\n\n## Rules\n\nRules **not** documented below are disabled by default. Consult the [rules reference][11] for a list of all rules.\n\n### Problems\n\nThe following rules are considered problems for `@flex-development/commitlint-config` and will yield a non-zero exit\ncode when not met.\n\n#### `body-full-stop`\n\n- **condition**: `body` ends with `value`\n- **rule**: `never`\n- **value**:\n\n  ```ts\n  '.'\n  ```\n\n#### `body-leading-blank`\n\n- **condition**: `body` begins with blank line\n- **rule**: `always`\n\n#### `body-max-length`\n\n- **condition**: `body` has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  Number.MAX_SAFE_INTEGER\n  ```\n\n#### `body-max-line-length`\n\n- **condition**: `body` lines has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  2050\n  ```\n\n#### `footer-leading-blank`\n\n- **condition**: `footer` begins with blank line\n- **rule**: `always`\n\n#### `footer-max-length`\n\n- **condition**: `footer` has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  Number.MAX_SAFE_INTEGER\n  ```\n\n#### `footer-max-line-length`\n\n- **condition**: `footer` lines has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  2050\n  ```\n\n#### `header-full-stop`\n\n- **condition**: `header` ends with `value`\n- **rule**: `never`\n- **value**:\n\n  ```ts\n  '.'\n  ```\n\n#### `header-max-length`\n\n- **condition**: `header` has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  100\n  ```\n\n#### `scope-case`\n\n- **condition**: `scope` is in case that is in `value`\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  ['kebab-case', 'lower-case']\n  ```\n\n#### `scope-enum`\n\n- **condition**: `scope` is found in `value`\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  scopes()\n  ```\n\n#### `scope-max-length`\n\n- **condition**: `scope` has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  max(scopes())\n  ```\n\n#### `scope-min-length`\n\n- **condition**: `scope` has `value` or more characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  min(scopes())\n  ```\n\n#### `subject-empty`\n\n- **condition**: `subject` is empty\n- **rule**: `never`\n\n#### `subject-full-stop`\n\n- **condition**: `subject` ends with `value`\n- **rule**: `never`\n- **value**:\n\n  ```ts\n  '.'\n  ```\n\n#### `subject-min-length`\n\n- **condition**: `subject` has `value` or more characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  2\n  ```\n\n#### `trailer-exists`\n\n- **condition**: `message` has trailer `value`\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  'Signed-off-by:'\n  ```\n\n#### `type-case`\n\n- **description**: `type` is in case `value`\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  'lower-case'\n  ```\n\n#### `type-empty`\n\n- **condition**: `type` is empty\n- **rule**: `never`\n\n#### `type-enum`\n\n- **condition**: `type` is found in `value`\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  types()\n  ```\n\n#### `type-max-length`\n\n- **condition**: `type` has `value` or less characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  max(types)\n  ```\n\n#### `type-min-length`\n\n- **condition**: `type` has `value` or more characters\n- **rule**: `always`\n- **value**:\n\n  ```ts\n  min(types())\n  ```\n\n## API\n\nThis package exports the following identifiers:\n\n- [`config`](#config)\n- `defaultIgnores`\n- `formatter`\n- `helpUrl`\n- `ignores`\n- [`max`](#maxarray)\n- [`min`](#minarray)\n- `parserPreset`\n- `plugins`\n- `prompt`\n- `rules`\n- [`scopes`](#scopesextras)\n- [`types`](#typesextras)\n\nThe default export is `config`.\n\n### `config`\n\n`commitlint` configuration object.\n\nProperties:\n\n- `defaultIgnores`\n- `formatter`\n- `helpUrl`\n- `ignores`\n- `parserPreset`\n- `plugins`\n- `prompt`\n- `rules`\n\nSee the [configuration reference][12] for more details.\n\n### Utilities\n\n#### `max(array)`\n\nReturns the length of the longest string in the given `array`.\n\n##### Parameters\n\n- `{string[]}` **`array`** \u0026mdash; Array to evaluate\n\n##### Returns\n\n`{number}` Length of longest string in `array`.\n\n##### Source\n\n\u003e [`src/utils/max.ts`](src/utils/max.ts)\n\n#### `min(array)`\n\nReturns the length of the shortest string in the given `array`.\n\n##### Parameters\n\n- `{string[]}` **`array`** \u0026mdash; Array to evaluate\n\n##### Returns\n\n`{number}` Length of shortest string in `array`.\n\n##### Source\n\n\u003e [`src/utils/min.ts`](src/utils/min.ts)\n\n#### `scopes([extras])`\n\nReturns an array containing valid commit scopes.\n\n##### Parameters\n\n- `{(Set\u003cstring\u003e | string[])?}` **`[extras=[]]`** \u0026mdash; Additional commit scopes\n\n##### Returns\n\n`{LiteralUnion\u003cScope, string\u003e[]}` Commit scopes array.\n\n##### Source\n\n\u003e [`src/utils/scopes.ts`](src/utils/scopes.ts)\n\n#### `types([extras])`\n\nReturns an array containing valid commit types.\n\n##### Parameters\n\n- `{(Set\u003cstring\u003e | string[])?}` **`[extras=[]]`** \u0026mdash; Additional commit types\n\n##### Returns\n\n`{LiteralUnion\u003cType, string\u003e[]}` Commit types array.\n\n##### Source\n\n\u003e [`src/utils/types.ts`](src/utils/types.ts)\n\n## Types\n\nThis package is fully typed with [TypeScript][13].\n\n### Enums\n\n- [`PromptKind`](src/enums/kind-prompt.ts)\n- [`ReferenceAction`](src/enums/reference-action.ts)\n- [`Scope`](src/enums/scope.ts)\n- [`Type`](src/enums/type.ts)\n\n### Interfaces\n\n- [`Commit`](src/interfaces/commit.ts)\n- [`Config`](src/interfaces/config.ts)\n- [`Note`](src/interfaces/note.ts)\n- [`ParserOptions`](src/interfaces/options-parser.ts)\n- [`PromptConfig`](src/interfaces/config-prompt.ts)\n- [`Reference`](src/interfaces/reference.ts)\n- [`Revert`](src/interfaces/revert.ts)\n- [`RulesConfig`](src/interfaces/config-rules.ts)\n\n### Type Definitions\n\n- [`NoteKeyword`](src/types/note-keyword.ts)\n- [`ParserPreset`](src/types/parser-preset.ts)\n- [`QuestionEnum`](src/types/question-enum.ts)\n- [`Question`](src/types/question.ts)\n- [`Questions`](src/types/questions.ts)\n\n## Contribute\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\n[1]: https://commitlint.js.org/\n[2]: https://conventionalcommits.org/\n[3]: https://commitlint.js.org/#/reference-cli\n[4]: https://commitlint.js.org/#/guides-use-prompt\n[5]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog\n[6]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser\n[7]: https://github.com/conventional-changelog/commitlint/issues/528\n[8]: https://commitlint.js.org/#/reference-rules?id=scope-enum\n[9]: https://commitlint.js.org/#/reference-rules?id=type-enum\n[10]: https://typestrong.org/ts-node/docs/options#project\n[11]: https://commitlint.js.org/#/reference-rules\n[12]: https://commitlint.js.org/#/reference-configuration\n[13]: https://www.typescriptlang.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fcommitlint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Fcommitlint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fcommitlint-config/lists"}