Skip to content

Commit

Permalink
feat(commitlint): loosen body-max-line-length rule (#649)
Browse files Browse the repository at this point in the history
`@commitlint/config-conventional` has `body-max-line-length: [2, always, 100]`,
but this setting is too strict to me.
  • Loading branch information
ybiquitous committed Aug 4, 2020
1 parent d5b239e commit eeb9b8d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ const initCommand = (baseDir, logger) => {
});
packageInfo.commitlint = {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": [1, "always", 100],
},
};
packageInfo.eslintConfig = {
root: true,
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
"@commitlint/config-conventional"
],
"rules": {
"body-max-line-length": [
1,
"always",
100
],
"scope-enum": [
2,
"always",
Expand Down
5 changes: 4 additions & 1 deletion test/fixtures/package-empty_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
]
},
"commitlint": {
"extends": ["@commitlint/config-conventional"]
"extends": ["@commitlint/config-conventional"],
"rules": {
"body-max-line-length": [1, "always", 100]
}
},
"eslintConfig": {
"root": true,
Expand Down
5 changes: 4 additions & 1 deletion test/fixtures/package-normal_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
]
},
"commitlint": {
"extends": ["@commitlint/config-conventional"]
"extends": ["@commitlint/config-conventional"],
"rules": {
"body-max-line-length": [1, "always", 100]
}
},
"eslintConfig": {
"root": true,
Expand Down

0 comments on commit eeb9b8d

Please sign in to comment.