lingxixue-mini-program/commitlint.config.js
2026-05-26 17:12:12 +08:00

48 lines
1.5 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// type 类别:用于表明本次提交做了那种类型的改动。
// - feat新增功能
// - fix缺陷修复
// - perf性能优化
// - refactor重构代码(既没有新增功能,也没有修复 bug)
// - style不影响程序逻辑的代码修改(代码风格样式等,没有改变代码逻辑)
// - docs文档更新
// - build项目构建系统(例如 glupwebpackrollup 的配置等)的提交
// - revert回滚某个更早之前的提交
// - chore不属于以上类型的其他类型
// optional scope一个可选的修改范围。用于标识此次提交主要涉及到代码中哪个模块。
// description一句话描述此次提交的主要内容做到言简意赅。
module.exports = {
ignores: [(commit) => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 108],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'style',
'docs',
'test',
'refactor',
'build',
'ci',
'chore',
'revert',
'wip',
'workflow',
'types',
'release',
],
],
},
};