Merge pull request #2 from acid-info/topic-configure-husky

Configure husky and lint-staged
This commit is contained in:
amir houieh 2023-04-21 10:55:27 +02:00 committed by GitHub
commit 871936702f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

4
.husky/pre-commit Executable file
View File

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

View File

@ -6,14 +6,13 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prepare": "husky install"
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
"eslint --ext .tsx,ts src/ --fix"
],
"src/**": [
"prettier --check 'src/**/*.ts' 'src/**/*.tsx'"
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix"
]
},
"husky": {