chore: use lint-staged for pre-commit (#6)

This commit is contained in:
Sasha 2023-05-17 13:05:02 +02:00 committed by GitHub
parent e4d0106499
commit 60717e5d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
#!/usr/bin/env sh #!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
npm run lint:fix npx lint-staged
npm run prettier:fix

View File

@ -103,7 +103,7 @@
}, },
"lint-staged": { "lint-staged": {
"*.{js,ts,tsx}": [ "*.{js,ts,tsx}": [
"npm run fix" "npm run fix && npm run type"
], ],
"*.{md,json,yml}": [ "*.{md,json,yml}": [
"prettier --write" "prettier --write"