Skip to content

Commit

Permalink
feat: add commitlint, husky, lint staged
Browse files Browse the repository at this point in the history
  • Loading branch information
Groupguanfang committed Feb 6, 2024
1 parent de08ef9 commit b1f3302
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint-staged
Binary file modified bun.lockb
Binary file not shown.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"deploy": "malagu deploy -m scf -m test",
"deploy:test": "malagu deploy -m scf -m test",
"deploy:pre": "malagu deploy -m scf -m pre",
"deploy:prod": "malagu deploy -m scf -m prod"
"deploy:prod": "malagu deploy -m scf -m prod",
"prepare": "husky",
"lint-staged": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,cjs,mjs,ts,tsx,cts,mts,json,vue,scss,less,html,md}": [
Expand Down Expand Up @@ -52,11 +54,7 @@
"eslint": "^8.56.0",
"eslint-plugin-vue": "^9.21.1",
"husky": "^9.0.10",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}
2 changes: 1 addition & 1 deletion src/browser/Root.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Logo from "./images/logo.png";
<hr />
<h1>Malagu Rpc + Vue 3 + Vue Router + Pinia + Vue Decorator + TSX</h1>
<h2>UNOCSS + Less</h2>
<h3>ESLint + Prettier + CommitLint + Husky + Link Staged</h3>
<h3>ESLint + Prettier + CommitLint + Husky + Lint Staged</h3>
<hr />
<p>
Powered by <a href="https://github.com/Groupguanfang">Zero</a>
Expand Down

0 comments on commit b1f3302

Please sign in to comment.