added husky formatting 🐶

ref #5
This commit is contained in:
Philipp Dormann 2021-03-19 17:23:08 +01:00
parent 116f9123e2
commit d0facb2846
3 changed files with 8 additions and 1 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn format

View File

@ -4,7 +4,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte"
"format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte",
"prepare": "husky install"
},
"devDependencies": {
"@svitejs/vite-plugin-svelte": "^0.11.1",
@ -12,6 +13,7 @@
"@types/html-minifier": "^4.0.0",
"axios": "^0.21.1",
"html-minifier": "^4.0.0",
"husky": "^5.1.3",
"prettier": "^2.2.1",
"prettier-plugin-svelte": "^2.2.0",
"svelte": "^3.35.0",