diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..f2d66f6 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +bun run lint-staged diff --git a/bun.lockb b/bun.lockb index 97babd1..2bc69d3 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 9b17c29..1f161fc 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "scripts": { "eslint": "eslint . --max-warnings=0", "eslint:fix": "eslint . --max-warnings=0 --fix", + "postinstall": "husky", "prettier": "prettier --check --ignore-unknown --no-error-on-unmatched-pattern *", "prettier:write": "prettier --write --ignore-unknown --no-error-on-unmatched-pattern *" }, @@ -153,10 +154,16 @@ } ] }, + "lint-staged": { + "*.{vue,js,jsx,cjs,mjs,ts,json}": "eslint --cache --fix", + "*": "prettier --write --ignore-unknown" + }, "prettier": "@exer7um/prettier-config", "devDependencies": { "@exer7um/eslint-config": "1.1.1", - "@exer7um/prettier-config": "0.4.2" + "@exer7um/prettier-config": "0.4.2", + "husky": "9.0.11", + "lint-staged": "15.2.2" }, "engines": { "vscode": "^1.69.0"