Skip to content

Commit 90537b8

Browse files
committed
config: add lint-staged pre-commit hook
1 parent f14c28a commit 90537b8

4 files changed

Lines changed: 1040 additions & 3 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npm run format
5-
npm run lint
4+
npx lint-staged

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{ts,tsx,js,jsx,html,css}": ["eslint src/** --fix", "prettier --write ."],
3+
"*.{json,md}": "prettier --write ."
4+
}

0 commit comments

Comments
 (0)