@mihairo/cmt 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +262 -0
- package/cmt +972 -0
- package/package.json +33 -0
- package/schema/cmt.schema.json +150 -0
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mihairo/cmt",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Zero-dependency conventional commits CLI — interactive picker, linter, and git hook installer. One bash script, works in any repo.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"conventional-commits",
|
|
7
|
+
"commit",
|
|
8
|
+
"git",
|
|
9
|
+
"lint",
|
|
10
|
+
"cli",
|
|
11
|
+
"hook",
|
|
12
|
+
"commitlint",
|
|
13
|
+
"husky"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/mihai-ro/cmt",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/mihai-ro/cmt/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/mihai-ro/cmt.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"bin": {
|
|
25
|
+
"cmt": "./cmt"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"cmt",
|
|
29
|
+
"schema/cmt.schema.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/mihai-ro/cmt/main/schema/cmt.schema.json",
|
|
4
|
+
"title": "cmt — Conventional Commits configuration",
|
|
5
|
+
"description": "Configuration file for cmt, the zero-dependency Conventional Commits CLI. Place as .cmt.json at your repository root.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "JSON Schema pointer — enables editor intellisense. Leave as-is."
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Config schema version. Currently '1.0.0'.",
|
|
18
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
19
|
+
"default": "1.0.0",
|
|
20
|
+
"examples": ["1.0.0"]
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
"customTypes": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"description": "Additional commit types appended after the built-in ones (feat, fix, docs, …).",
|
|
26
|
+
"default": [],
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"description": "A single custom commit type.",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["type", "description"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"type": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "The type keyword used in the commit header, e.g. 'wip' or 'security'. Must be lowercase letters, digits, hyphens or underscores.",
|
|
36
|
+
"pattern": "^[a-z][a-z0-9_-]*$",
|
|
37
|
+
"examples": ["wip", "security", "i18n", "release", "deps"]
|
|
38
|
+
},
|
|
39
|
+
"emoji": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Optional emoji displayed in 'cmt log' and the commit picker.",
|
|
42
|
+
"default": "⚙️",
|
|
43
|
+
"examples": ["🚧", "🔒", "🌍", "🚀", "📦"]
|
|
44
|
+
},
|
|
45
|
+
"semver": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "The Semantic Versioning impact this type carries. Use 'none' for types that don't affect the public API.",
|
|
48
|
+
"enum": ["major", "minor", "patch", "none"],
|
|
49
|
+
"default": "none"
|
|
50
|
+
},
|
|
51
|
+
"description": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Short human-readable description shown in the interactive commit picker.",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"examples": [
|
|
56
|
+
"Work in progress — not ready for review",
|
|
57
|
+
"Security fix or hardening"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
"scopes": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"description": "Suggested scopes shown in the 'cmt commit' scope picker. Users can also type a custom scope or skip. Leave empty for free-text input only. E.g. ['auth', 'api', 'ui', 'db'].",
|
|
67
|
+
"default": [],
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "A single scope name. Lowercase, no spaces.",
|
|
71
|
+
"pattern": "^[a-z][a-z0-9_/-]*$",
|
|
72
|
+
"examples": ["auth", "api", "ui", "db", "cli", "docs", "deps", "config"]
|
|
73
|
+
},
|
|
74
|
+
"uniqueItems": true
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
"rules": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"description": "Lint rules applied by 'cmt lint' and the commit-msg git hook.",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"default": {},
|
|
82
|
+
"properties": {
|
|
83
|
+
"maxHeaderLength": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"description": "Maximum character length of the commit header line. Headers longer than this emit a warning. Default: 72.",
|
|
86
|
+
"minimum": 20,
|
|
87
|
+
"maximum": 200,
|
|
88
|
+
"default": 72,
|
|
89
|
+
"examples": [50, 72, 100]
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
"requireScope": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"description": "When true, 'cmt lint' will error if no scope is present in the commit header. Default: false.",
|
|
95
|
+
"default": false
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
"allowBreakingChanges": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"description": "Commit types allowed to carry a BREAKING CHANGE footer or '!' marker. Default: [\"feat\", \"fix\"].",
|
|
101
|
+
"default": ["feat", "fix"],
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"examples": ["feat", "fix", "refactor", "perf"]
|
|
105
|
+
},
|
|
106
|
+
"uniqueItems": true
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
"disallowUpperCaseDescription": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"description": "When true, descriptions starting with an uppercase letter are an error (not just a warning). Default: false.",
|
|
112
|
+
"default": false
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
"disallowTrailingPeriod": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"description": "When true, descriptions ending with a period are an error (not just a warning). Default: false.",
|
|
118
|
+
"default": false
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
"examples": [
|
|
125
|
+
{
|
|
126
|
+
"$schema": "https://raw.githubusercontent.com/mihai-ro/cmt/main/schema/cc.schema.json",
|
|
127
|
+
"version": "1.0.0",
|
|
128
|
+
"customTypes": [
|
|
129
|
+
{
|
|
130
|
+
"type": "wip",
|
|
131
|
+
"emoji": "🚧",
|
|
132
|
+
"semver": "none",
|
|
133
|
+
"description": "Work in progress — not ready for review"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "security",
|
|
137
|
+
"emoji": "🔒",
|
|
138
|
+
"semver": "patch",
|
|
139
|
+
"description": "Security fix or hardening"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"scopes": ["auth", "api", "ui", "db"],
|
|
143
|
+
"rules": {
|
|
144
|
+
"maxHeaderLength": 72,
|
|
145
|
+
"requireScope": false,
|
|
146
|
+
"allowBreakingChanges": ["feat", "fix", "refactor"]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|