Skip to content

Commit 6167371

Browse files
byCedricmarionebl
authored andcommitted
docs: add formatter option to configuration
1 parent 738d298 commit 6167371

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/reference-configuration.md

+20
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type Config = {
1818
* Resolveable id to conventional-changelog parser preset to import and use
1919
*/
2020
parserPreset?: string;
21+
/*
22+
* Resolveable id to package, from node_modules, which formats the output.
23+
*/
24+
formatter: string;
2125
/*
2226
* Rules to check against
2327
*/
@@ -35,6 +39,11 @@ const Configuration: Config = {
3539
* Referenced packages must be installed
3640
*/
3741
parserPreset: 'conventional-changelog-atom',
42+
/*
43+
* Resolve and load @commitlint/format from node_modules.
44+
* Referenced package must be installed
45+
*/
46+
formatter: '@commitlint/format',
3847
/*
3948
* Any rules defined here will override rules from @commitlint/config-conventional
4049
*/
@@ -136,6 +145,17 @@ module.exports = {
136145
};
137146
```
138147

148+
## Formatter
149+
150+
Commitlint can output the issues encountered in different formats, if necessary.
151+
Use ids resolvable by the node resolve algorithm.
152+
153+
```js
154+
module.exports = {
155+
formatter: '@commitlint/format'
156+
};
157+
```
158+
139159
## Rules
140160

141161
Refer to [Rules](reference-rules.md) for a complete list of available rules.

0 commit comments

Comments
 (0)