Skip to content

Commit

Permalink
configure husky
Browse files Browse the repository at this point in the history
  • Loading branch information
honeymaro committed Nov 30, 2022
1 parent eb99f38 commit 12d78d0
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

tsc --skipLibCheck --noEmit
npm run lint-staged
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint --ext .ts,.tsx src",
"format": "prettier **/*.ts **/*.tsx --write"
"format": "prettier **/*.ts **/*.tsx --write",
"prepare": "husky install",
"lint-staged": "lint-staged"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint",
"prettier --write",
"git add"
]
},
"dependencies": {
"@emotion/react": "^11.10.4",
Expand Down Expand Up @@ -45,6 +54,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.2",
"lint-staged": "^13.0.4",
"prettier": "^2.7.1",
"typescript": "^4.6.4",
"vite": "^3.1.0",
Expand Down
Loading

0 comments on commit 12d78d0

Please sign in to comment.