@theholocron/commitlint-config 1.10.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/CHANGELOG.md +13 -0
- package/README.md +149 -0
- package/commitlint.config.js +6 -0
- package/package.json +24 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @theholocron/commitlint-config
|
|
2
|
+
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`16a5369`](https://github.com/theholocron/configs/commit/16a536930746ee06d1eb882181da7b4834359395) Thanks [@iamnewton](https://github.com/iamnewton)! - Testing out publishing
|
|
8
|
+
|
|
9
|
+
## 0.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`897b640`](https://github.com/theholocron/configs/commit/897b6402a117e0b1dea3ca7d2cda5acc42ff729d) Thanks [@iamnewton](https://github.com/iamnewton)! - Add CommitLint configuration
|
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# CommitLint Config
|
|
2
|
+
|
|
3
|
+
A [CommitLint configuration](https://commitlint.js.org/#/reference-configuration) for writing well-formatted and consistent Git commits.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev @theholocron/commitlint-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
In your project `package.json` add the following:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"commitlint": {
|
|
18
|
+
"extends": "@theholocron"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## How We Write Commits
|
|
24
|
+
|
|
25
|
+
### Problems
|
|
26
|
+
|
|
27
|
+
The following rules are considered problems for `@theholocron/commitlint-config` and will yield a non-zero exit code when not met.
|
|
28
|
+
|
|
29
|
+
Consult [docs/rules](https://conventional-changelog.github.io/commitlint/#/reference-rules) for a list of available rules.
|
|
30
|
+
|
|
31
|
+
#### type-enum
|
|
32
|
+
|
|
33
|
+
- **condition**: `type` is found in value
|
|
34
|
+
- **rule**: `always`
|
|
35
|
+
- **value**
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
[
|
|
39
|
+
'build',
|
|
40
|
+
'ci',
|
|
41
|
+
'chore',
|
|
42
|
+
'docs',
|
|
43
|
+
'feat',
|
|
44
|
+
'fix',
|
|
45
|
+
'perf',
|
|
46
|
+
'refactor',
|
|
47
|
+
'revert',
|
|
48
|
+
'style',
|
|
49
|
+
'test'
|
|
50
|
+
]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
echo "foo: some message" # fails
|
|
55
|
+
echo "fix: some message" # passes
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### type-case
|
|
59
|
+
|
|
60
|
+
- **description**: `type` is in case `value`
|
|
61
|
+
- **rule**: `always`
|
|
62
|
+
- **value**
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
'lowerCase'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
echo "FIX: some message" # fails
|
|
70
|
+
echo "fix: some message" # passes
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### type-empty
|
|
74
|
+
|
|
75
|
+
- **condition**: `type` is empty
|
|
76
|
+
- **rule**: `never`
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
echo ": some message" # fails
|
|
80
|
+
echo "fix: some message" # passes
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### scope-case
|
|
84
|
+
|
|
85
|
+
- **condition**: `scope` is in case `value`
|
|
86
|
+
- **rule**: `always`
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
'lowerCase'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
echo "fix(SCOPE): some message" # fails
|
|
94
|
+
echo "fix(scope): some message" # passes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### subject-case
|
|
98
|
+
|
|
99
|
+
- **condition**: `subject` is in one of the cases `['sentence-case', 'start-case', 'pascal-case', 'upper-case']`
|
|
100
|
+
- **rule**: `never`
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
echo "fix(SCOPE): Some message" # fails
|
|
104
|
+
echo "fix(SCOPE): Some Message" # fails
|
|
105
|
+
echo "fix(SCOPE): SomeMessage" # fails
|
|
106
|
+
echo "fix(SCOPE): SOMEMESSAGE" # fails
|
|
107
|
+
echo "fix(scope): some message" # passes
|
|
108
|
+
echo "fix(scope): some Message" # passes
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### subject-empty
|
|
112
|
+
|
|
113
|
+
- **condition**: `subject` is empty
|
|
114
|
+
- **rule**: `never`
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
echo "fix:" # fails
|
|
118
|
+
echo "fix: some message" # passes
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### subject-full-stop
|
|
122
|
+
|
|
123
|
+
- **condition**: `subject` ends with `value`
|
|
124
|
+
- **rule**: `never`
|
|
125
|
+
- **value**
|
|
126
|
+
|
|
127
|
+
```js
|
|
128
|
+
'.'
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
echo "fix: some message." # fails
|
|
133
|
+
echo "fix: some message" # passes
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
#### header-max-length
|
|
137
|
+
|
|
138
|
+
- **condition**: `header` has `value` or less characters
|
|
139
|
+
- **rule**: `always`
|
|
140
|
+
- **value**
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
72
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails
|
|
148
|
+
echo "fix: some message" # passes
|
|
149
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@theholocron/commitlint-config",
|
|
3
|
+
"homepage": "https://github.com/theholocron/configs/tree/main/packages/commitlint-config#readme",
|
|
4
|
+
"description": "A CommitLint configuration for writing well-formatted and consistent Git commits.",
|
|
5
|
+
"author": "Newton Koumantzelis",
|
|
6
|
+
"version": "1.10.0",
|
|
7
|
+
"main": "commitlint.config.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/theholocron/configs.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": "https://github.com/theholocron/configs/issues",
|
|
14
|
+
"releases": "https://github.com/theholocron/configs/releases",
|
|
15
|
+
"wiki": "https://github.com/theholocron/configs/wiki",
|
|
16
|
+
"license": "GPL-3.0",
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@commitlint/cli": "^19.5.0",
|
|
22
|
+
"@commitlint/config-conventional": "^19.5.0"
|
|
23
|
+
}
|
|
24
|
+
}
|