Skip to content

Commit ce8555e

Browse files
committed
docs: specify rules as object in the usage example
1 parent cdd4cfe commit ce8555e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ Use this plugin in your project's commitlint configuration by specifying it as i
4343
module.exports = {
4444
extends: ['@commitlint/config-conventional'],
4545
plugins: ['commitlint-plugin-function-rules'],
46-
rules: [
47-
'header-max-length': [0], // level: disabled
46+
rules: {
47+
'header-max-length': [0], // level: disabled
4848
'function-rules/header-max-length': [
49-
2, // level: error
49+
2, // level: error
5050
'always',
5151
(parsed) => {
5252
if (parsed.type === 'chore' && parsed.header.length < 20) {
@@ -55,7 +55,7 @@ module.exports = {
5555
return [false, 'chore header must not be longer than 120 characters'];
5656
},
5757
],
58-
]
58+
},
5959
};
6060
```
6161

0 commit comments

Comments
 (0)