@ethima/commitlint-config

中文文档
3.2.1发布于 2026/09/02MITES Module构建来源已验证近 30 天下载 3万

A shareable Commitlint configuration for the Ethima organization

原始使用文档
文档目录3 节
  1. Differences from the config-conventional configuration
  2. More lenient rules regarding long lines in bodies and foote…
  3. Stricter rules on merge and fixup! / squash! commits

Commitlint Configuration

A shareable configuration for Commitlint for projects maintained by the Ethima organization. The configuration is based on the conventional commits configuration, with some minor adjustments as detailed below.

Differences from the config-conventional configuration

More lenient rules regarding long lines in bodies and footers

When referencing URIs in commit messages it is trivial to trigger the {body,footer}-max-line-length rules. This is a common scenario when referencing code, commits, etc. on source hosting platforms.

One scenario in which long URIs in a commit message are common are release commits of the semantic release process. Specifically linking to source commits for changelog entries, see the initial release of this configuration for an example. These commits, assumed to have a header of the form build|chore(release): v<x.y.z>, are exempt from any checks.

Other long URI references can be included in commit messages by writing them as Markdown footnotes, e.g. [^1]: <long URI>, [^named-footnote]: <long URI> at the end of the commit message and referencing them from the body. Most hosting platforms will render these footnotes with proper links, etc. in various places in their UI. To support this functionality, this configuration replaces the {body,footer}-max-line-length rules with the {body,footer}-max-line-length-with-footnote-exemption rules. Apart from the exemption, these rules behave the same as the original rules and accept the same configuration. Both the body- and footer- rules are replaced as some URIs may trigger the footer detection in the commit message parser, particularly when a URI includes a #.

Stricter rules on merge and fixup!/squash! commits

The desired workflow for projects using this configuration is to use feature branches that are continuously rebased on top of (pre)release branches. This includes the use of fixup! and squash! commits, which should all be rebased out prior to merging into a (pre)release branch. However, by default, these types of commits are allowed by the is-ignored configuration, resulting in merge/pull requests not being blocked when they should be by Commitlint.

Additionally, the default is-ignored configuration allows different types of merge commits which do not align well with the process set out here, e.g. merging into a feature branch or pulling updates using a merge strategy. All of these commits should also be rebased out prior to merging into a (pre)release branch.

The only acceptable commits that are ignored by default are those related to "reverts", which may be used to update/undo conventionally documented changes prior to a release and merge commits that result from merging feature branches into (pre)release branches.

版本与发布记录

@ethima/commitlint-config 共发布 19 个版本,首次发布于 2023/11/09;过去 12 个月发布了 12 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.2.1latest2026/09/022 个月前
3.2.02026/07/154 个月前
3.1.02026/06/274 个月前
3.0.02026/06/035 个月前
2.5.12026/05/076 个月前
2.5.02026/03/297 个月前

关于 @ethima/commitlint-config 的常见问题

@ethima/commitlint-config 是什么?

A shareable Commitlint configuration for the Ethima organization

如何安装 @ethima/commitlint-config?

在项目目录运行 npm install @ethima/commitlint-config,或使用 pnpm add / yarn add / bun add。

@ethima/commitlint-config 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ethima__commitlint-config 是否存在。

@ethima/commitlint-config 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ethima/commitlint-config 可以商用吗?

@ethima/commitlint-config 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ethima/commitlint-config 的下载量有多少?

根据 npm 官方下载统计,@ethima/commitlint-config 在 2026/10/14 – 2026/11/12 这 30 天内被下载 30,018 次,日均约 1,001 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ethima/commitlint-config 还在维护吗?

最新版本 3.2.1 发布于 2026/09/02(2 个月前);至今共发布 19 个版本,其中过去 12 个月发布了 12 个;首次发布于 2023/11/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。