diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/package.json b/package.json index c5fde9d..f534045 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "astro build", "preview": "astro preview", "lint": "eslint", - "astro": "astro" + "astro": "astro", + "prepare": "husky" }, "dependencies": { "@astrojs/react": "^3.3.1", @@ -45,5 +46,8 @@ "lint-staged": "^15.2.2", "typescript": "^5.4.5", "typescript-eslint": "^7.9.0" + }, + "lint-staged": { + "*.{js,jsx,mjs,ts,tsx,mts,astro}": "eslint --fix" } -} +} \ No newline at end of file