feat: precommit hook

main
palid 2023-09-22 20:17:54 +02:00
parent 71f9dc9d9c
commit fbef43b77f
Signed by: palid
SSH Key Fingerprint: SHA256:Mus3wCd2x6nxtARI0DpWGT7lIWbNy3R90BVDg0j35PI
4 changed files with 972 additions and 1 deletions

4
.husky/pre-commit Executable file
View File

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

4
.lintstagedrc Normal file
View File

@ -0,0 +1,4 @@
{
"*.ts": ["eslint --fix", "prettier --write"],
"*.svelte": ["eslint --fix", "prettier --write"]
}

960
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,8 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
"format": "prettier --plugin-search-dir . --write .",
"prepare": "husky install"
},
"devDependencies": {
"@floating-ui/dom": "^1.4.5",
@ -30,8 +31,10 @@
"eslint-plugin-svelte": "^2.33.2",
"highlight.js": "^11.8.0",
"html2pdf.js": "^0.9.0",
"husky": "^8.0.3",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.6.0",
"lint-staged": "^14.0.1",
"postcss": "^8.4.27",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",