-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
64 lines (63 loc) · 1.86 KB
/
commitlint.config.js
File metadata and controls
64 lines (63 loc) · 1.86 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
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// Type enum - standard conventional commit types
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'docs', // Documentation only changes
'style', // Code style changes (formatting, missing semi-colons, etc)
'refactor', // Code change that neither fixes a bug nor adds a feature
'perf', // Performance improvement
'test', // Adding or correcting tests
'build', // Changes to build system or external dependencies
'ci', // Changes to CI configuration files and scripts
'chore', // Other changes that don't modify src or test files
'revert', // Reverts a previous commit
],
],
// Scope validation - allow package names and common scopes
'scope-enum': [
2,
'always',
[
// Package scopes
'core',
'react',
'react-headless',
'react-shadcn',
'adapter-authsome',
'adapter-clerk',
'adapter-generic',
'adapter-supabase',
// Common scopes
'deps',
'release',
'config',
'docs',
'demo',
'monorepo',
],
],
// Allow empty scope for commits that affect multiple packages
'scope-empty': [0],
// Subject rules
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'subject-max-length': [2, 'always', 100],
// Body rules
'body-leading-blank': [2, 'always'],
'body-max-line-length': [2, 'always', 100],
// Footer rules
'footer-leading-blank': [2, 'always'],
'footer-max-line-length': [2, 'always', 100],
},
};