Added Husky & Prettier

This commit is contained in:
Thom Werring 2023-10-21 14:10:31 +02:00
parent 6265986a8b
commit a73c024e0a
2 changed files with 8 additions and 0 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

@ -74,5 +74,9 @@
"^@/(.*)$": "<rootDir>/$1", "^@/(.*)$": "<rootDir>/$1",
"^@$": "<rootDir>/main.ts" "^@$": "<rootDir>/main.ts"
} }
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --fix",
"*.{js,jsx,ts,tsx,css,md}": "prettier --write"
} }
} }