@@ -19,6 +19,19 @@ Shareable [`commitlint`][1] config enforcing [conventional commits][2]
19
19
- [ Use] ( #use )
20
20
- [ Customizing scopes and types] ( #customizing-scopes-and-types )
21
21
- [ API] ( #api )
22
+ - [ ` config ` ] ( #config )
23
+ - ` defaultIgnores `
24
+ - ` formatter `
25
+ - ` helpUrl `
26
+ - ` ignores `
27
+ - [ ` max(array) ` ] ( #maxarray )
28
+ - [ ` min(array) ` ] ( #minarray )
29
+ - ` parserPreset `
30
+ - ` plugins `
31
+ - ` prompt `
32
+ - ` rules `
33
+ - [ ` scopes([extras]) ` ] ( #scopesextras )
34
+ - [ ` types([extras]) ` ] ( #typesextras )
22
35
- [ Types] ( #types )
23
36
- [ Enums] ( #enums )
24
37
- [ Interfaces] ( #interfaces )
@@ -106,11 +119,110 @@ See [`docs/examples/commitlint.config.cjs`](docs/examples/commitlint.config.cjs)
106
119
107
120
## API
108
121
109
- ** TODO** : api documentation.
122
+ This package exports the following identifiers:
123
+
124
+ - [ ` config ` ] ( #config )
125
+ - ` defaultIgnores `
126
+ - ` formatter `
127
+ - ` helpUrl `
128
+ - ` ignores `
129
+ - [ ` max ` ] ( #maxarray )
130
+ - [ ` min ` ] ( #minarray )
131
+ - ` parserPreset `
132
+ - ` plugins `
133
+ - ` prompt `
134
+ - ` rules `
135
+ - [ ` scopes ` ] ( #scopesextras )
136
+ - [ ` types ` ] ( #typesextras )
137
+
138
+ The default export is ` config ` .
139
+
140
+ ### ` config `
141
+
142
+ ` commitlint ` configuration object.
143
+
144
+ Properties:
145
+
146
+ - ` defaultIgnores `
147
+ - ` formatter `
148
+ - ` helpUrl `
149
+ - ` ignores `
150
+ - ` parserPreset `
151
+ - ` plugins `
152
+ - ` prompt `
153
+ - ` rules `
154
+
155
+ See the [ configuration reference] [ 11 ] for more details.
156
+
157
+ ### Utilities
158
+
159
+ #### ` max(array) `
160
+
161
+ Returns the length of the longest string in the given ` array ` .
162
+
163
+ ##### Parameters
164
+
165
+ - ` {string[]} ` ** ` array ` ** &mdash ; Array to evaluate
166
+
167
+ ##### Returns
168
+
169
+ ` {number} ` Length of longest string in ` array ` .
170
+
171
+ ##### Source
172
+
173
+ > [ ` src/utils/max.ts ` ] ( src/utils/max.ts )
174
+
175
+ #### ` min(array) `
176
+
177
+ Returns the length of the shortest string in the given ` array ` .
178
+
179
+ ##### Parameters
180
+
181
+ - ` {string[]} ` ** ` array ` ** &mdash ; Array to evaluate
182
+
183
+ ##### Returns
184
+
185
+ ` {number} ` Length of shortest string in ` array ` .
186
+
187
+ ##### Source
188
+
189
+ > [ ` src/utils/min.ts ` ] ( src/utils/min.ts )
190
+
191
+ #### ` scopes([extras]) `
192
+
193
+ Returns an array containing valid commit scopes.
194
+
195
+ ##### Parameters
196
+
197
+ - ` {(Set<string> | string[])?} ` ** ` [extras=[]] ` ** &mdash ; Additional commit scopes
198
+
199
+ ##### Returns
200
+
201
+ ` {LiteralUnion<Scope, string>[]} ` Commit scopes array.
202
+
203
+ ##### Source
204
+
205
+ > [ ` src/utils/scopes.ts ` ] ( src/utils/scopes.ts )
206
+
207
+ #### ` types([extras]) `
208
+
209
+ Returns an array containing valid commit types.
210
+
211
+ ##### Parameters
212
+
213
+ - ` {(Set<string> | string[])?} ` ** ` [extras=[]] ` ** &mdash ; Additional commit types
214
+
215
+ ##### Returns
216
+
217
+ ` {LiteralUnion<Type, string>[]} ` Commit types array.
218
+
219
+ ##### Source
220
+
221
+ > [ ` src/utils/types.ts ` ] ( src/utils/types.ts )
110
222
111
223
## Types
112
224
113
- This package is fully typed with [ TypeScript] [ 11 ] .
225
+ This package is fully typed with [ TypeScript] [ 12 ] .
114
226
115
227
### Enums
116
228
@@ -152,4 +264,5 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md).
152
264
[ 8 ] : https://commitlint.js.org/#/reference-rules?id=scope-enum
153
265
[ 9 ] : https://commitlint.js.org/#/reference-rules?id=type-enum
154
266
[ 10 ] : https://typestrong.org/ts-node/docs/options#project
155
- [ 11 ] : https://www.typescriptlang.org
267
+ [ 11 ] : https://commitlint.js.org/#/reference-configuration
268
+ [ 12 ] : https://www.typescriptlang.org
0 commit comments