Skip to content

Commit f4dd0d1

Browse files
committed
chore(git): adds husky hooks
1 parent 063fce1 commit f4dd0d1

File tree

4 files changed

+213
-7
lines changed

4 files changed

+213
-7
lines changed

.husky/commit-msg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npx --no -- commitlint --edit $1
1+
npx -s commitlint --edit "$1"

.husky/pre-commit

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

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,16 @@
7272
"extract-changelog-release": "^1.0.2",
7373
"husky": "^9.0.11",
7474
"jsonc-eslint-parser": "^2.4.0",
75+
"lint-staged": "^15.2.7",
7576
"prettier": "^3.2.5",
7677
"standard-version": "^9.5.0",
7778
"tsup": "^8.0.2",
7879
"typescript": "^5.4.5",
7980
"vitest": "^1.6.0"
81+
},
82+
"lint-staged": {
83+
"*.{js,jsx,ts,tsx,vue,svelte,json,md}": [
84+
"eslint --fix"
85+
]
8086
}
8187
}

0 commit comments

Comments
 (0)