Skip to content

Commit 43da018

Browse files
authored
ENG-1305 Add Prettier format-on-save via pre-commit hook (#865)
1 parent c7f62a2 commit 43da018

3 files changed

Lines changed: 240 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
"dev": "turbo dev",
88
"lint": "turbo lint",
99
"deploy": "turbo deploy",
10-
"format": "prettier --write \"**/*.{ts,tsx,md}\""
10+
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
11+
"prepare": "husky"
1112
},
1213
"devDependencies": {
14+
"husky": "^9.1.7",
15+
"lint-staged": "^16.3.2",
1316
"prettier": "^3.6.0",
1417
"prettier-plugin-gherkin": "^3.1.3",
1518
"prettier-plugin-tailwindcss": "^0.6.13",
@@ -30,6 +33,9 @@
3033
],
3134
"tailwindConfig": "./packages/tailwind-config/tailwind.config.ts"
3235
},
36+
"lint-staged": {
37+
"*.{ts|tsx|md}": "prettier -w"
38+
},
3339
"dependencies": {
3440
"posthog-js": "catalog:"
3541
}

0 commit comments

Comments
 (0)