Skip to content

Commit

Permalink
fix: simplify ignore list
Browse files Browse the repository at this point in the history
  • Loading branch information
fadnincx committed Feb 8, 2024
1 parent 52772e1 commit ce3c384
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions .github/configs/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
const { maxLineLength } = require('@commitlint/ensure')

const bodyMaxLineLength = 200

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': [0, "always"],
},
}

0 comments on commit ce3c384

Please sign in to comment.