Skip to content

Commit

Permalink
chore: husky
Browse files Browse the repository at this point in the history
  • Loading branch information
lencx committed Jan 22, 2023
1 parent d84c113 commit 6a7eabf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pretty-quick
cargo fmt
git add .
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"fmt:rs": "cargo fmt",
"tr": "tr",
"tauri": "tauri",
"prettier": "prettier -c --write '**/*'",
"pretty-quick": "pretty-quick"
"prettier": "prettier -c --write '**/*.{js,md,ts,tsx,yml}'",
"pretty-quick": "pretty-quick --staged",
"prepare": "husky install"
},
"license": "MIT",
"author": "lencx <[email protected]>",
Expand All @@ -35,11 +36,6 @@
"type": "git",
"url": "https://github.com/lencx/ChatGPT"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"dependencies": {
"@ant-design/icons": "^4.8.0",
"@monaco-editor/react": "^4.4.6",
Expand Down

0 comments on commit 6a7eabf

Please sign in to comment.