✅ Added Husky and lint-staged to all package.json files - common_plat: root package.json - voice_agent: all 3 dashboards (admin, user, tracker) ✅ Created setup scripts - scripts/setup-husky.sh in both repos - Creates .husky/pre-commit with HUSKY_ENABLED flag check ✅ Added documentation - HUSKY_SETUP.md: Complete setup and usage guide - SHELL_ALIASES.md: Shell aliases for easy toggle Features: - Environment variable control: HUSKY_ENABLED=false/true - lint-staged runs only on changed files (~2-5s) - Auto-fixes ESLint and formats with Prettier - Can be bypassed with --no-verify or husky-off alias To activate after pulling: 1. pnpm install (or npm install) 2. pnpm prepare (or npm run prepare) 3. ./scripts/setup-husky.sh
50 lines
1.4 KiB
JSON
50 lines
1.4 KiB
JSON
{
|
|
"name": "@bytelyst/root",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "pnpm -r build",
|
|
"test": "pnpm -r test",
|
|
"test:coverage": "pnpm -r exec vitest run --coverage",
|
|
"typecheck": "pnpm -r exec tsc --noEmit",
|
|
"lint": "pnpm -r exec eslint . --ext .ts,.tsx",
|
|
"lint:fix": "pnpm -r exec eslint . --ext .ts,.tsx --fix",
|
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
"audit": "pnpm -r audit --audit-level moderate",
|
|
"clean": "pnpm -r exec rm -rf dist",
|
|
"prepare": "husky install"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "^20.0.0",
|
|
"@types/react": "^19.0.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
"@typescript-eslint/parser": "^8.0.0",
|
|
"@vitest/coverage-v8": "^3.0.0",
|
|
"eslint": "^9.0.0",
|
|
"husky": "^9.0.0",
|
|
"lint-staged": "^15.0.0",
|
|
"prettier": "^3.0.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^3.0.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@azure/cosmos": ">=4.0.0",
|
|
"bcryptjs": ">=2.4.0",
|
|
"jose": ">=5.0.0",
|
|
"react": ">=18.0.0",
|
|
"zod": "^3.24.0"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,tsx}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{js,jsx,json,md,yml,yaml}": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|