From df9d096ec2b1e4bb1b6fdefc195d3c37324cbea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Aveiro?= Date: Thu, 10 Apr 2025 17:32:57 +0100 Subject: [PATCH] ci: update commitlint config --- .github/configs/commitlint.config.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/configs/commitlint.config.js b/.github/configs/commitlint.config.js index 2c3951d..a55dc92 100644 --- a/.github/configs/commitlint.config.js +++ b/.github/configs/commitlint.config.js @@ -1,27 +1,9 @@ -const { maxLineLength } = require('@commitlint/ensure') - -const bodyMaxLineLength = 100 - -const validateBodyMaxLengthIgnoringDeps = (parsedCommit) => { - const { type, scope, body } = parsedCommit - const isDepsCommit = - type === 'chore' && scope === 'release' - - return [ - isDepsCommit || !body || maxLineLength(body, bodyMaxLineLength), - `body's lines must not be longer than ${bodyMaxLineLength}`, - ] -} - module.exports = { extends: ['@commitlint/config-conventional'], - plugins: ['commitlint-plugin-function-rules'], rules: { - 'body-max-line-length': [0], - 'function-rules/body-max-line-length': [ - 2, - 'always', - validateBodyMaxLengthIgnoringDeps, - ], + 'body-max-line-length': [1, 'always', 100], // warning + 'header-max-length': [1, 'always', 100], // warning + 'footer-max-line-length': [1, 'always', 100], // warning + 'subject-case': [1, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']], // warning }, }