chore: add husky

This commit is contained in:
Ayo Ayco 2024-12-25 18:36:10 +01:00
parent 7baacc6c43
commit 1dbc82b252
3 changed files with 15 additions and 2 deletions

1
.husky/pre-commit Normal file
View file

@ -0,0 +1 @@
npm run lint

View file

@ -12,7 +12,8 @@
"astro": "astro", "astro": "astro",
"build:preview": "astro build && astro preview", "build:preview": "astro build && astro preview",
"deploy": "astro build && scp -r dist ayo@ayco.io:~/ayco.io-flask/", "deploy": "astro build && scp -r dist ayo@ayco.io:~/ayco.io-flask/",
"copy:dist": "astro build && cp -R dist ../ayco.io-flask/" "copy:dist": "astro build && cp -R dist ../ayco.io-flask/",
"prepare": "husky"
}, },
"devDependencies": { "devDependencies": {
"@astro-reactive/form": "^0.10.0", "@astro-reactive/form": "^0.10.0",
@ -25,7 +26,8 @@
"astro-iconify": "^1.2.0", "astro-iconify": "^1.2.0",
"eslint": "^9.17.0", "eslint": "^9.17.0",
"eslint-plugin-astro": "^1.3.1", "eslint-plugin-astro": "^1.3.1",
"eslint-plugin-jsx-a11y": "^6.10.2" "eslint-plugin-jsx-a11y": "^6.10.2",
"husky": "^9.1.7"
}, },
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c" "packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
} }

View file

@ -41,6 +41,9 @@ importers:
eslint-plugin-jsx-a11y: eslint-plugin-jsx-a11y:
specifier: ^6.10.2 specifier: ^6.10.2
version: 6.10.2(eslint@9.17.0) version: 6.10.2(eslint@9.17.0)
husky:
specifier: ^9.1.7
version: 9.1.7
packages: packages:
@ -2002,6 +2005,11 @@ packages:
http-cache-semantics@4.1.1: http-cache-semantics@4.1.1:
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
husky@9.1.7:
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
engines: {node: '>=18'}
hasBin: true
iconv-lite@0.6.3: iconv-lite@0.6.3:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -5562,6 +5570,8 @@ snapshots:
http-cache-semantics@4.1.1: {} http-cache-semantics@4.1.1: {}
husky@9.1.7: {}
iconv-lite@0.6.3: iconv-lite@0.6.3:
dependencies: dependencies:
safer-buffer: 2.1.2 safer-buffer: 2.1.2