Skip to content

Commit 715f34e

Browse files
chore: add Husky pre-commit hook and Prettier configuration
- Added a pre-commit hook to run lint-staged with pnpm. - Created .prettierignore to specify files and directories to ignore for Pre
1 parent 0cc89a0 commit 715f34e

File tree

7 files changed

+294
-3
lines changed

7 files changed

+294
-3
lines changed

.husky/pre-commit

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

.prettierignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
coverage
4+
5+
.husky
6+
dist
7+
build
8+
.next
9+
10+
.gitignore
11+
.git
12+
.vscode
13+
.idea
14+
15+
pnpm-lock.yaml
16+
.pnpm-store
17+
package-lock.json
18+
yarn.lock
19+
bun.lockb
20+
21+
.playwright-mcp
22+
playwright-report
23+
test-results

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"singleQuote": true,
4+
"semi": false
5+
}

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
"build": "next build",
88
"start": "next start --port 3009",
99
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=0",
10+
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --max-warnings=0",
1011
"typecheck": "tsc --noEmit",
1112
"e2e": "playwright test",
1213
"e2e:desktop": "playwright test --project=\"Desktop Chrome\"",
1314
"e2e:tablet": "playwright test --project=\"Tablet Safari\"",
14-
"e2e:mobile": "playwright test --project=\"Mobile Chrome\""
15+
"e2e:mobile": "playwright test --project=\"Mobile Chrome\"",
16+
"prepare": "husky",
17+
"prettier": "prettier --ignore-unknown --write ."
1518
},
1619
"dependencies": {
1720
"@radix-ui/react-dialog": "^1.1.15",
@@ -37,12 +40,18 @@
3740
"axe-core": "^4.11.0",
3841
"eslint": "^9.38.0",
3942
"eslint-config-next": "^16.0.0",
43+
"husky": "^9.1.7",
44+
"lint-staged": "^16.2.5",
4045
"postcss": "^8.5.6",
46+
"prettier": "^3.6.2",
4147
"tailwindcss": "^4.1.15",
4248
"typescript": "^5.9.3"
4349
},
4450
"packageManager": "pnpm@10.17.1",
4551
"volta": {
4652
"node": "22.20.0"
53+
},
54+
"lint-staged": {
55+
"*": "prettier --ignore-unknown --write"
4756
}
4857
}

0 commit comments

Comments
 (0)