Skip to content

Commit b8d5d39

Browse files
committed
chore: Setup pre-commit hooks
1 parent dd5410c commit b8d5d39

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Diff for: .husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run lint-staged

Diff for: bun.lockb

8.7 KB
Binary file not shown.

Diff for: package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"scripts": {
5151
"eslint": "eslint . --max-warnings=0",
5252
"eslint:fix": "eslint . --max-warnings=0 --fix",
53+
"postinstall": "husky",
5354
"prettier": "prettier --check --ignore-unknown --no-error-on-unmatched-pattern *",
5455
"prettier:write": "prettier --write --ignore-unknown --no-error-on-unmatched-pattern *"
5556
},
@@ -153,10 +154,16 @@
153154
}
154155
]
155156
},
157+
"lint-staged": {
158+
"*.{vue,js,jsx,cjs,mjs,ts,json}": "eslint --cache --fix",
159+
"*": "prettier --write --ignore-unknown"
160+
},
156161
"prettier": "@exer7um/prettier-config",
157162
"devDependencies": {
158163
"@exer7um/eslint-config": "1.1.1",
159-
"@exer7um/prettier-config": "0.4.2"
164+
"@exer7um/prettier-config": "0.4.2",
165+
"husky": "9.0.11",
166+
"lint-staged": "15.2.2"
160167
},
161168
"engines": {
162169
"vscode": "^1.69.0"

0 commit comments

Comments
 (0)