Skip to content

Commit 994c3c0

Browse files
feat: configure Husky 9 and Commitlint 19 properly (#157)
1 parent 9c4956d commit 994c3c0

6 files changed

Lines changed: 5 additions & 18 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33
[*]
44
insert_final_newline = true
55

6-
[*.js]
6+
[*.js,*.json]
77
indent_style = space
88
indent_size = 4
99

.husky/commit-message

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
npx --no -- commitlint --edit "$1"
1+
npx --no -- commitlint --config commitlint.config.mjs --edit "$1"

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no lint-staged

commitlint.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

commitlint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {extends: ['@commitlint/config-conventional']};

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"lint:yml": "eslint \"**/*.yml\"",
1717
"start": "npm-run-all -l clean -p start:*",
1818
"start:eleventy": "run-p dev cms",
19-
"prepare": "husky install"
19+
"prepare": "husky"
2020
},
2121
"repository": {
2222
"type": "git",
@@ -65,9 +65,6 @@
6565
"lint-staged": {
6666
"*.scss": "stylelint --fix",
6767
"*.{js,yml}": "eslint --fix",
68-
"*.md": [
69-
"markdownlint-cli2 --fix",
70-
"eslint --fix"
71-
]
68+
"*.md": ["markdownlint-cli2 --fix", "eslint --fix"]
7269
}
7370
}

0 commit comments

Comments
 (0)