diff --git a/web/.husky/pre-commit b/web/.husky/pre-commit new file mode 100755 index 0000000..7e15468 --- /dev/null +++ b/web/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run lint-staged diff --git a/web/package.json b/web/package.json index d1f82e3..2568eea 100644 --- a/web/package.json +++ b/web/package.json @@ -7,12 +7,7 @@ "build": "vite build", "preview": "vite preview", "lint-staged": "lint-staged", - "precommit": "eslint src/**/*.js" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } + "prepare": "husky install" }, "lint-staged": { "src/**/*.{js,ts,vue}": [ @@ -36,7 +31,7 @@ "@vitejs/plugin-vue": "^4.2.3", "eslint": "^8.43.0", "eslint-plugin-vue": "^9.15.1", - "husky": "^8.0.3", + "husky": "^8.0.0", "lint-staged": "^13.2.2", "prettier": "^2.8.8", "typescript": "^5.1.3", diff --git a/web/src/router/index.js b/web/src/router/index.js index 073c52a..33b0041 100644 --- a/web/src/router/index.js +++ b/web/src/router/index.js @@ -38,5 +38,6 @@ router.afterEach((to, from) => { console.log('To:', to.path); }); let abc = '123'; +let c = 'dasd'; // expose router export default router;