@@ -18,6 +18,31 @@ Shareable [`commitlint`][1] config enforcing [conventional commits][2]
18
18
- [ Install] ( #install )
19
19
- [ Use] ( #use )
20
20
- [ Customizing scopes and types] ( #customizing-scopes-and-types )
21
+ - [ Rules] ( #rules )
22
+ - [ Problems] ( #problems )
23
+ - [ ` body-full-stop ` ] ( #body-full-stop )
24
+ - [ ` body-leading-blank ` ] ( #body-leading-blank )
25
+ - [ ` body-max-length ` ] ( #body-max-length )
26
+ - [ ` body-max-line-length ` ] ( #body-max-line-length )
27
+ - [ ` footer-leading-blank ` ] ( #footer-leading-blank )
28
+ - [ ` footer-max-length ` ] ( #footer-max-length )
29
+ - [ ` footer-max-line-length ` ] ( #footer-max-line-length )
30
+ - [ ` header-full-stop ` ] ( #header-full-stop )
31
+ - [ ` header-max-length ` ] ( #header-max-length )
32
+ - [ ` scope-case ` ] ( #scope-case )
33
+ - [ ` scope-enum ` ] ( #scope-enum )
34
+ - [ ` scope-max-length ` ] ( #scope-max-length )
35
+ - [ ` scope-min-length ` ] ( #scope-min-length )
36
+ - [ ` signed-off-by ` ] ( #signed-off-by )
37
+ - [ ` subject-empty ` ] ( #subject-empty )
38
+ - [ ` subject-full-stop ` ] ( #subject-full-stop )
39
+ - [ ` subject-min-length ` ] ( #subject-min-length )
40
+ - [ ` trailer-exists ` ] ( #trailer-exists )
41
+ - [ ` type-case ` ] ( #type-case )
42
+ - [ ` type-empty ` ] ( #type-empty )
43
+ - [ ` type-enum ` ] ( #type-enum )
44
+ - [ ` type-max-length ` ] ( #type-max-length )
45
+ - [ ` type-min-length ` ] ( #type-min-length )
21
46
- [ API] ( #api )
22
47
- [ ` config ` ] ( #config )
23
48
- ` defaultIgnores `
@@ -117,6 +142,225 @@ You may need to set [`TS_NODE_PROJECT`][10] if running `commitlint` from the com
117
142
118
143
See [ ` docs/examples/commitlint.config.cjs ` ] ( docs/examples/commitlint.config.cjs ) for an example config written in pure CommonJS.
119
144
145
+ ## Rules
146
+
147
+ Rules ** not** documented below are disabled by default. Consult the [ rules reference] [ 11 ] for a list of all rules.
148
+
149
+ ### Problems
150
+
151
+ The following rules are considered problems for ` @flex-development/commitlint-config ` and will yield a non-zero exit
152
+ code when not met.
153
+
154
+ #### ` body-full-stop `
155
+
156
+ - ** condition** : ` body ` ends with ` value `
157
+ - ** rule** : ` never `
158
+ - ** value** :
159
+
160
+ ``` ts
161
+ ' .'
162
+ ```
163
+
164
+ #### ` body-leading-blank `
165
+
166
+ - ** condition** : ` body ` begins with blank line
167
+ - ** rule** : ` always `
168
+
169
+ #### ` body-max-length `
170
+
171
+ - ** condition** : ` body ` has ` value ` or less characters
172
+ - ** rule** : ` always `
173
+ - ** value** :
174
+
175
+ ``` ts
176
+ Number .MAX_SAFE_INTEGER
177
+ ```
178
+
179
+ #### ` body-max-line-length `
180
+
181
+ - ** condition** : ` body ` lines has ` value ` or less characters
182
+ - ** rule** : ` always `
183
+ - ** value** :
184
+
185
+ ``` ts
186
+ 2050
187
+ ```
188
+
189
+ #### ` footer-leading-blank `
190
+
191
+ - ** condition** : ` footer ` begins with blank line
192
+ - ** rule** : ` always `
193
+
194
+ #### ` footer-max-length `
195
+
196
+ - ** condition** : ` footer ` has ` value ` or less characters
197
+ - ** rule** : ` always `
198
+ - ** value** :
199
+
200
+ ``` ts
201
+ Number .MAX_SAFE_INTEGER
202
+ ```
203
+
204
+ #### ` footer-max-line-length `
205
+
206
+ - ** condition** : ` footer ` lines has ` value ` or less characters
207
+ - ** rule** : ` always `
208
+ - ** value** :
209
+
210
+ ``` ts
211
+ 2050
212
+ ```
213
+
214
+ #### ` header-full-stop `
215
+
216
+ - ** condition** : ` header ` ends with ` value `
217
+ - ** rule** : ` never `
218
+ - ** value** :
219
+
220
+ ``` ts
221
+ ' .'
222
+ ```
223
+
224
+ #### ` header-max-length `
225
+
226
+ - ** condition** : ` header ` has ` value ` or less characters
227
+ - ** rule** : ` always `
228
+ - ** value** :
229
+
230
+ ``` ts
231
+ 100
232
+ ```
233
+
234
+ #### ` scope-case `
235
+
236
+ - ** condition** : ` scope ` is in case that is in ` value `
237
+ - ** rule** : ` always `
238
+ - ** value** :
239
+
240
+ ``` ts
241
+ [' kebab-case' , ' lower-case' ]
242
+ ```
243
+
244
+ #### ` scope-enum `
245
+
246
+ - ** condition** : ` scope ` is found in ` value `
247
+ - ** rule** : ` always `
248
+ - ** value** :
249
+
250
+ ``` ts
251
+ scopes ()
252
+ ```
253
+
254
+ #### ` scope-max-length `
255
+
256
+ - ** condition** : ` scope ` has ` value ` or less characters
257
+ - ** rule** : ` always `
258
+ - ** value** :
259
+
260
+ ``` ts
261
+ max (scopes ())
262
+ ```
263
+
264
+ #### ` scope-min-length `
265
+
266
+ - ** condition** : ` scope ` has ` value ` or more characters
267
+ - ** rule** : ` always `
268
+ - ** value** :
269
+
270
+ ``` ts
271
+ min (scopes ())
272
+ ```
273
+
274
+ #### ` signed-off-by `
275
+
276
+ - ** condition** : ` message ` has ` value `
277
+ - ** rule** : ` always `
278
+ - ** value** :
279
+
280
+ ``` ts
281
+ ' Signed-off-by:'
282
+ ```
283
+
284
+ #### ` subject-empty `
285
+
286
+ - ** condition** : ` subject ` is empty
287
+ - ** rule** : ` never `
288
+
289
+ #### ` subject-full-stop `
290
+
291
+ - ** condition** : ` subject ` ends with ` value `
292
+ - ** rule** : ` never `
293
+ - ** value** :
294
+
295
+ ``` ts
296
+ ' .'
297
+ ```
298
+
299
+ #### ` subject-min-length `
300
+
301
+ - ** condition** : ` subject ` has ` value ` or more characters
302
+ - ** rule** : ` always `
303
+ - ** value** :
304
+
305
+ ``` ts
306
+ 2
307
+ ```
308
+
309
+ #### ` trailer-exists `
310
+
311
+ - ** condition** : ` message ` has trailer ` value `
312
+ - ** rule** : ` always `
313
+ - ** value** :
314
+
315
+ ``` ts
316
+ ' Signed-off-by:'
317
+ ```
318
+
319
+ #### ` type-case `
320
+
321
+ - ** description** : ` type ` is in case ` value `
322
+ - ** rule** : ` always `
323
+ - ** value** :
324
+
325
+ ``` ts
326
+ ' lower-case'
327
+ ```
328
+
329
+ #### ` type-empty `
330
+
331
+ - ** condition** : ` type ` is empty
332
+ - ** rule** : ` never `
333
+
334
+ #### ` type-enum `
335
+
336
+ - ** condition** : ` type ` is found in ` value `
337
+ - ** rule** : ` always `
338
+ - ** value** :
339
+
340
+ ``` ts
341
+ types ()
342
+ ```
343
+
344
+ #### ` type-max-length `
345
+
346
+ - ** condition** : ` type ` has ` value ` or less characters
347
+ - ** rule** : ` always `
348
+ - ** value** :
349
+
350
+ ``` ts
351
+ max (types )
352
+ ```
353
+
354
+ #### ` type-min-length `
355
+
356
+ - ** condition** : ` type ` has ` value ` or more characters
357
+ - ** rule** : ` always `
358
+ - ** value** :
359
+
360
+ ``` ts
361
+ min (types ())
362
+ ```
363
+
120
364
## API
121
365
122
366
This package exports the following identifiers:
@@ -152,7 +396,7 @@ Properties:
152
396
- ` prompt `
153
397
- ` rules `
154
398
155
- See the [ configuration reference] [ 11 ] for more details.
399
+ See the [ configuration reference] [ 12 ] for more details.
156
400
157
401
### Utilities
158
402
@@ -222,7 +466,7 @@ Returns an array containing valid commit types.
222
466
223
467
## Types
224
468
225
- This package is fully typed with [ TypeScript] [ 12 ] .
469
+ This package is fully typed with [ TypeScript] [ 13 ] .
226
470
227
471
### Enums
228
472
@@ -264,5 +508,6 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md).
264
508
[ 8 ] : https://commitlint.js.org/#/reference-rules?id=scope-enum
265
509
[ 9 ] : https://commitlint.js.org/#/reference-rules?id=type-enum
266
510
[ 10 ] : https://typestrong.org/ts-node/docs/options#project
267
- [ 11 ] : https://commitlint.js.org/#/reference-configuration
268
- [ 12 ] : https://www.typescriptlang.org
511
+ [ 11 ] : https://commitlint.js.org/#/reference-rules
512
+ [ 12 ] : https://commitlint.js.org/#/reference-configuration
513
+ [ 13 ] : https://www.typescriptlang.org
0 commit comments