feat: add Husky pre-commit hook with lint-staged

This commit is contained in:
Sergey Krylov 2026-06-14 09:01:03 +03:00
parent 090a2b613f
commit 515e59600f
2 changed files with 11 additions and 1 deletions

1
.husky/pre-commit Executable file
View File

@ -0,0 +1 @@
npx lint-staged

View File

@ -17,9 +17,18 @@
"format": "prettier --write \"**/*.{ts,tsx}\"",
"format:check": "prettier --check \"**/*.{ts,tsx}\"",
"dev:docs": "npm run dev -w apps/docs",
"build:docs": "npm run build -w apps/docs"
"build:docs": "npm run build -w apps/docs",
"prepare": "husky"
},
"lint-staged": {
"apps/backend/src/**/*.ts": ["eslint --max-warnings=0"],
"apps/backend/test/**/*.ts": ["eslint --max-warnings=0"],
"apps/frontend/src/**/*.{ts,tsx}": ["eslint --max-warnings=0"],
"*.{ts,tsx}": ["prettier --check"]
},
"devDependencies": {
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"prettier": "^3.0.0"
}
}