diff --git a/.husky/pre-commit b/.husky/pre-commit index 4e90cbe..f54fc9c 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ -bunx prettier . --write -bunx eslint_d $(git diff --name-only HEAD | grep -E '\.(*)$' | xargs) +bunx lint-staged \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 2a0d2d0..45a729f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 2a7225c..d6c7542 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "eslint-plugin-svelte": "^2.36.0", "globals": "^15.0.0", "husky": "^9.1.7", + "lint-staged": "^15.3.0", "prettier": "^3.3.2", "prettier-plugin-svelte": "^3.2.6", "prettier-plugin-tailwindcss": "^0.6.5", @@ -83,5 +84,12 @@ "tailwind-merge": "^2.5.5", "twilio": "^5.4.0", "zod": "^3.24.0" + }, + "lint-staged": { + "*.{json,yml,yaml,css}": "prettier --write", + "*.{js,ts,svelte}": [ + "prettier --write", + "eslint --fix" + ] } }