-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
63 lines (61 loc) · 2.21 KB
/
Copy pathcommitlint.config.ts
File metadata and controls
63 lines (61 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type { UserConfig } from '@commitlint/types';
const config: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', // New user-facing feature
'fix', // Bug fix
'perf', // Performance improvement
'refactor', // Code restructuring (no behaviour change)
'docs', // Documentation only
'chore', // Build system, tooling, maintenance
'test', // Test additions or corrections
'style', // Formatting, whitespace (no logic change)
'build', // Build scripts and configuration
'ci', // CI/CD pipeline changes
'revert', // Revert a previous commit
'security', // Security patch or hardening
'deps', // Dependency updates
'infra', // Infrastructure / deployment changes
'migration', // Database or schema migrations
],
],
'scope-enum': [
1, // warn — allow unknown scopes without blocking
'always',
[
// Applications
'web', 'api', 'docs',
// Libraries
'ui', 'core', 'data', 'features', 'ai', 'trendyol',
// Cross-cutting
'deps', 'infra', 'ci', 'auth', 'release', 'workspace',
'supabase', 'migrations', 'env',
],
],
// Subject rules
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'subject-min-length': [2, 'always', 5],
// Header
'header-max-length': [2, 'always', 100],
// Body
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 200],
// Footer
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 200],
// Type / scope casing
'scope-case': [2, 'always', 'lower-case'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
},
// Skip WIP commits in local dev
ignores: [(msg) => msg.startsWith('WIP') || msg.startsWith('wip')],
helpUrl: 'https://github.com/ofcskn/minimalblock/blob/main/CONTRIBUTING.md#commit-convention',
};
export default config;