Files
CDNManager/commitlint.config.cjs
T
Denozordec 64e6df8703
quality / commitlint (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / changes (push) Successful in 4s
quality / docker-check (push) Skipped
quality / web (push) Successful in 57s
quality / api (push) Successful in 41s
CD / quality (push) Successful in 1m46s
CD / publish (push) Successful in 11m48s
ci(hooks): добавить commit-msg и шаблон Conventional Commits
Без type/scope semantic-release не ставил тег и пропускал bake.
2026-09-04 13:43:48 +07:00

52 lines
1.1 KiB
JavaScript
Raw 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 {import('@commitlint/types').UserConfig} */
module.exports = {
extends: ['@commitlint/config-conventional'],
plugins: [
{
rules: {
'scope-no-commas': ({ scope }) => {
if (scope && scope.includes(',')) {
return [
false,
'scope must not contain commas (semantic-release will not parse the commit type)',
];
}
return [true];
},
/** Subject after «:» must contain Cyrillic (project convention). */
'subject-cyrillic': ({ subject }) => {
if (!subject) return [true];
if (/[а-яёА-ЯЁ]/.test(subject)) return [true];
return [
false,
'subject after «:» must be in Russian (Cyrillic), e.g. feat(web): добавить экран нод',
];
},
},
},
],
rules: {
// Subject после «:» на русском — не английский sentence-case.
'subject-case': [0],
'scope-no-commas': [2, 'always'],
'subject-cyrillic': [2, 'always'],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'ci',
'refactor',
'docs',
'chore',
'test',
'style',
'build',
'revert',
],
],
},
};