diff --git a/frontend/.husky/pre-commit b/frontend/.husky/pre-commit new file mode 100644 index 00000000..2312dc58 --- /dev/null +++ b/frontend/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/frontend/package.json b/frontend/package.json index 61a2806e..6d4ef80d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "prepare": "husky" }, "dependencies": { "@emotion/react": "^11.14.0", @@ -66,8 +67,15 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.14.0", + "husky": "^9.1.7", + "lint-staged": "^15.2.2", "postcss": "^8.5.0", "tailwindcss": "^3.4.17", "vite": "^6.0.5" + }, + "lint-staged": { + "*.{js,jsx,ts,tsx}": [ + "eslint --fix --max-warnings=0" + ] } }