diff --git a/.husky/commit-msg b/.husky/commit-msg index 0bd658f49..284b65c58 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx --no-install commitlint --edit "$1" +commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100755 new mode 100644 index 8b91b2a38..3867a0feb --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -# npm run yaml -# npm test +npm run lint diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 4fedde6da..7fc454024 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1 +1,21 @@ -module.exports = { extends: ['@commitlint/config-conventional'] } +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + [ + 'break', + 'feat', + 'fix', + 'chore', + 'docs', + 'refactor', + 'revert', + 'test' + ] + ], + 'subject-case': [2, 'never', ['start-case', 'pascal-case']], + 'scope-case': [0] + } +} diff --git a/package.json b/package.json index db28004d3..9bd254fd0 100644 --- a/package.json +++ b/package.json @@ -219,39 +219,7 @@ "webpack": "webpack", "webpack:analyze": "webpack", "yaml": "node scripts/holidays2json.cjs", - "prepare": "husky install" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ], - "rules": { - "type-enum": [ - 2, - "always", - [ - "break", - "feat", - "fix", - "chore", - "docs", - "refactor", - "revert", - "test" - ] - ], - "subject-case": [ - 2, - "never", - [ - "start-case", - "pascal-case" - ] - ], - "scope-case": [ - 0 - ] - } + "prepare": "husky" }, "browserslist": [ "> 1%",