Skip to content

Commit

Permalink
Merge pull request fdo-rs#636 from miabbott/commitlint
Browse files Browse the repository at this point in the history
chore: fix require error with commitlint
  • Loading branch information
mergify[bot] authored Feb 28, 2024
2 parents 0d781b3 + 860772d commit bc7f0b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable import/no-extraneous-dependencies */
const { maxLineLength } = require('@commitlint/ensure')
const validateBodyMaxLengthIgnoringDeps = async (parsedCommit) => {
const { maxLineLength } = await import('@commitlint/ensure');

const bodyMaxLineLength = 100

const validateBodyMaxLengthIgnoringDeps = (parsedCommit) => {
const { type, scope, body } = parsedCommit
const isDepsCommit =
type === 'chore'
&& body != null
&& body.includes('Updates the requirements on');

const bodyMaxLineLength = 100;

return [
isDepsCommit || !body || maxLineLength(body, bodyMaxLineLength),
`body's lines must not be longer than ${bodyMaxLineLength}`,
Expand Down

0 comments on commit bc7f0b9

Please sign in to comment.