chore: update commitlint with custom rules

This commit is contained in:
pommee
2025-09-27 10:58:11 +02:00
parent 61861ef591
commit 7b6f446615
2 changed files with 54 additions and 1 deletions

View File

@@ -1 +0,0 @@
export default { extends: ["@commitlint/config-conventional"] };

View File

@@ -0,0 +1,54 @@
import {
RuleConfigCondition,
RuleConfigSeverity,
TargetCaseType,
UserConfig
} from "@commitlint/types";
const config: UserConfig = {
parserPreset: "conventional-changelog-conventionalcommits",
rules: {
"body-leading-blank": [RuleConfigSeverity.Warning, "always"] as const,
"body-max-line-length": [
RuleConfigSeverity.Error,
"always",
999999
] as const,
"footer-leading-blank": [RuleConfigSeverity.Warning, "always"] as const,
"footer-max-line-length": [
RuleConfigSeverity.Error,
"always",
100
] as const,
"header-max-length": [RuleConfigSeverity.Error, "always", 100] as const,
"header-trim": [RuleConfigSeverity.Error, "always"] as const,
"subject-case": [
RuleConfigSeverity.Error,
"never",
["sentence-case", "start-case", "pascal-case", "upper-case"]
] as [RuleConfigSeverity, RuleConfigCondition, TargetCaseType[]],
"subject-empty": [RuleConfigSeverity.Error, "never"] as const,
"type-case": [RuleConfigSeverity.Error, "always", "lower-case"] as const,
"type-empty": [RuleConfigSeverity.Error, "never"] as const,
"type-enum": [
RuleConfigSeverity.Error,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"ui",
"test"
]
] as [RuleConfigSeverity, RuleConfigCondition, string[]]
}
};
export default config;