diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..3867a0f --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint diff --git a/package.json b/package.json index 4994739..28e7cce 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "astro": "astro", "build:preview": "astro build && astro preview", "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": { "@astro-reactive/form": "^0.10.0", @@ -25,7 +26,8 @@ "astro-iconify": "^1.2.0", "eslint": "^9.17.0", "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" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3fb614..4932ac7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,9 @@ importers: eslint-plugin-jsx-a11y: specifier: ^6.10.2 version: 6.10.2(eslint@9.17.0) + husky: + specifier: ^9.1.7 + version: 9.1.7 packages: @@ -2002,6 +2005,11 @@ packages: http-cache-semantics@4.1.1: 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: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -5562,6 +5570,8 @@ snapshots: http-cache-semantics@4.1.1: {} + husky@9.1.7: {} + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2