From f6b912280cddbcece71f29571e9346b54824af1f Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Wed, 5 Aug 2020 00:03:16 +0900 Subject: [PATCH] feat(commitlint): loosen `body-max-line-length` rule `@commitlint/config-conventional` has `body-max-line-length: [2, always, 100]`, but this setting is too strict to me. --- lib/init.js | 3 +++ package.json | 5 +++++ test/fixtures/package-empty_expected.json | 5 ++++- test/fixtures/package-normal_expected.json | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/init.js b/lib/init.js index 085f55ca..685a36d0 100644 --- a/lib/init.js +++ b/lib/init.js @@ -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, diff --git a/package.json b/package.json index 7bd8eef3..03d5003b 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,11 @@ "@commitlint/config-conventional" ], "rules": { + "body-max-line-length": [ + 1, + "always", + 100 + ], "scope-enum": [ 2, "always", diff --git a/test/fixtures/package-empty_expected.json b/test/fixtures/package-empty_expected.json index 6129b1b8..1cb23f95 100644 --- a/test/fixtures/package-empty_expected.json +++ b/test/fixtures/package-empty_expected.json @@ -43,7 +43,10 @@ ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"] + "extends": ["@commitlint/config-conventional"], + "rules": { + "body-max-line-length": [1, "always", 100] + } }, "eslintConfig": { "root": true, diff --git a/test/fixtures/package-normal_expected.json b/test/fixtures/package-normal_expected.json index 6ee720ef..c1f02a97 100644 --- a/test/fixtures/package-normal_expected.json +++ b/test/fixtures/package-normal_expected.json @@ -44,7 +44,10 @@ ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"] + "extends": ["@commitlint/config-conventional"], + "rules": { + "body-max-line-length": [1, "always", 100] + } }, "eslintConfig": { "root": true,