Skip to content

Commit

Permalink
running prettier on pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyhastings committed Oct 28, 2023
1 parent 30b97a6 commit 37fc709
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 0 deletions.
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"

pnpm lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,jsx,ts,tsx,mjs,mts,cjs,json,md}": ["prettier --write"]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"format:check": "prettier --check .",
"format:apply": "prettier --write .",
"lint": "turbo run lint",
"prepare": "husky install",
"start": "turbo run start",
"types:check": "turbo run types:check"
},
"devDependencies": {
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"prettier": "^3.0.3",
"prettierrc": "workspace:*",
"turbo": "^1.10.16"
Expand Down
Loading

0 comments on commit 37fc709

Please sign in to comment.