Skip to content

Commit

Permalink
refactor(commitlint): migrate to v19
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Feb 29, 2024
1 parent b4193ac commit 345c8fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .commitlintrc.cjs → .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const commitlintConfigConventional = require("@commitlint/config-conventional");
import commitlintConfigConventional from "@commitlint/config-conventional"

const ruleMaxLineLength =
commitlintConfigConventional.rules["body-max-line-length"];

ruleMaxLineLength[0] = process.env.CI === "true" ? 1 : 2;

module.exports = {
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": ruleMaxLineLength,
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm commitlint --edit "$1"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"test:e2e:docker:server:node:update": "pnpm --dir tests run test:e2e:docker:server:node:update",
"test:e2e:docker:server:static": "pnpm --dir tests run test:e2e:docker:server:static",
"test:e2e:docker:server:static:update": "pnpm --dir tests run test:e2e:docker:server:static:update"
}
},
"type": "module"
}

0 comments on commit 345c8fb

Please sign in to comment.