diff --git a/.gitignore b/.gitignore
index 057b929f7..1f787226f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,5 @@ env/
.vscode/
/docs/.vitepress/
/docs/src
-/node_modules/
\ No newline at end of file
+/node_modules/
+/.husky/
\ No newline at end of file
diff --git a/.git-hooks/pre-commit b/.husky/pre-commit
similarity index 100%
rename from .git-hooks/pre-commit
rename to .husky/pre-commit
diff --git a/package-lock.json b/package-lock.json
index f3fc88870..293860cf6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,6 +4,10 @@
"requires": true,
"packages": {
"": {
+ "hasInstallScript": true,
+ "dependencies": {
+ "husky": "^9.1.7"
+ },
"devDependencies": {
"@eslint/js": "^9.19.0",
"eslint": "^9.19.0",
@@ -11,6 +15,7 @@
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.14.0",
+ "husky": "^8.0.0",
"lint-staged": "^15.4.3",
"prettier": "^3.4.2",
"vitepress": "^1.6.3"
@@ -2717,6 +2722,22 @@
"node": ">=16.17.0"
}
},
+ "node_modules/husky": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
+ "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "husky": "lib/bin.js"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/typicode"
+ }
+ },
"node_modules/ignore": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
diff --git a/package.json b/package.json
index 3b0dd3ba3..8ca74142d 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,9 @@
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
- "postinstall": "git config core.hooksPath .git-hooks",
- "lint-staged": "lint-staged"
+ "postinstall": "npx husky-init && xcopy /E /I /Y sys\\hooks\\* .husky\\",
+ "lint-staged": "lint-staged",
+ "prepare": "husky install"
},
"devDependencies": {
"@eslint/js": "^9.19.0",
@@ -16,12 +17,16 @@
"globals": "^15.14.0",
"lint-staged": "^15.4.3",
"prettier": "^3.4.2",
- "vitepress": "^1.6.3"
+ "vitepress": "^1.6.3",
+ "husky": "^8.0.0"
},
"lint-staged": {
"*.{js,ts,vue}": [
"prettier --write",
"eslint --fix"
]
+ },
+ "dependencies": {
+ "husky": "^9.1.7"
}
}
diff --git a/src/front/src/App.vue b/src/front/src/App.vue
index 03564b8e1..0e89b464f 100644
--- a/src/front/src/App.vue
+++ b/src/front/src/App.vue
@@ -2,51 +2,44 @@
-
diff --git a/sys/hooks/pre-commit b/sys/hooks/pre-commit
new file mode 100644
index 000000000..4cd742445
--- /dev/null
+++ b/sys/hooks/pre-commit
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+npm run lint-staged