Skip to content

Commit 2e0ee40

Browse files
committed
chore: add tooling
1 parent 5f6f093 commit 2e0ee40

File tree

7 files changed

+1656
-0
lines changed

7 files changed

+1656
-0
lines changed

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit "${1}"

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn staged

README.md

Whitespace-only changes.

commitlint.config.cjs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
module.exports = {
3+
extends: ['@commitlint/config-conventional']
4+
}

lint-staged.config.cjs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
"**/*/README.md": ["markdown-toc-gen insert", "prettier --write"],
3+
"**/*.{ts,tsx,js,jsx,md,json,yml}": ["prettier --write"],
4+
};

package.json

+8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@
88
},
99
"repository": "https://github.com/hyper63/hyper/docs",
1010
"scripts": {
11+
"prepare": "husky install",
12+
"staged": "lint-staged --allow-empty --concurrent false",
1113
"dev": "vitepress dev src",
1214
"build": "vitepress build src",
1315
"preview": "vitepress preview src"
1416
},
1517
"license": "Apache-2.0",
1618
"devDependencies": {
19+
"@commitlint/cli": "^18.4.3",
20+
"@commitlint/config-conventional": "^18.4.3",
21+
"husky": "^8.0.3",
22+
"lint-staged": "^15.2.0",
23+
"markdown-toc-gen": "^1.0.1",
24+
"prettier": "^2.8.8",
1725
"vitepress": "1.0.0-rc.34",
1826
"vue": "^3.4.3"
1927
}

0 commit comments

Comments
 (0)