Platform Help

Commitlint

Prerequisites:

pnpm i -D @kurocado-studio/styleguide

Install Commitlint

pnpm i -D @commitlint/cli @commitlint/config-conventional

Configure Commitlint

Use the config file extension that matches your repo:

  • If your repo is ESM ("type": "module"), use .commitlintrc.js.

  • Otherwise, use .commitlintrc.mjs.

Create .commitlintrc.js (ESM):

export { commitlint as default } from '@kurocado-studio/styleguide';

Options

Export

Type

Use when

Notes

commitlint

object

Default commit message policy

This is what our repos use by default.

commitLintConfig

object

Same as above

Alias of commitlint for naming consistency.

commitLintReferenceRequiredConfig

object

You want PR/issues references required

Adds references-empty: [2, "never"].

Rules enforced (summary)

Rule

Value

Header max length

90

Body max line length

200

Allowed scope

config, docs, ci, release, ui, test, api, deps, deps-dev

Allowed type

build, chore, ci, docs, feat, fix, perf, pnpm, refactor, release, revert, style, test

Add scripts

{ "scripts": { "commitlint": "commitlint --edit .git/COMMIT_EDITMSG" } }

Troubleshooting

  • Using .commitlintrc.cjs: this package is ESM, so CJS requires a dynamic import. Don’t do that unless you have no choice.

Last modified: 18 December 2025