Skip to content

Commit

Permalink
added husky pre-commit format
Browse files Browse the repository at this point in the history
  • Loading branch information
madalinul committed Nov 11, 2023
1 parent d9c3aad commit a8017ff
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 4 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npx lint-staged
npx lint-staged
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"scripts": {
"dev": "email dev",
"format": "npx prettier . --write"
"format": "npx prettier . --write",
"prepare": "husky install"
},
"dependencies": {
"@react-email/button": "0.0.8",
Expand All @@ -17,6 +18,12 @@
"@typescript-eslint/parser": "^5.59.5",
"eslint": "^8.40.0",
"eslint-plugin-react": "^7.32.2",
"husky": ">=6",
"lint-staged": ">=10",
"prettier": "2.8.8"
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.--write": "prettier --write"
}
}
Loading

0 comments on commit a8017ff

Please sign in to comment.