This project uses Husky and lint-staged to ensure code quality.
Before each commit, the following checks run automatically on staged files:
- ✨ Prettier - Auto-formats code
- 🔍 ESLint - Lints and auto-fixes issues
- ✨ Prettier - Auto-formats templates
- ✨ Prettier - Auto-formats styles
- ✨ Prettier - Auto-formats JSON
Pre-commit hooks are automatically installed when you run:
npm installThe prepare script in package.json runs husky install automatically.
If hooks are not working, run:
npm run prepareIn exceptional cases, you can skip hooks with:
git commit --no-verify -m "your message"Configuration is in package.json under the lint-staged key.
Example:
"lint-staged": {
"*.ts": [
"prettier --write",
"eslint --fix"
]
}Hooks are located in .husky/ directory:
.husky/pre-commit- Runs before each commit
- Check if
.huskyfolder exists - Verify hook is executable:
ls -la .husky/pre-commit - Re-run setup:
npm run prepare - Make sure dependencies are installed:
npm install
The project includes a .npmrc file with legacy-peer-deps=true to handle Angular version conflicts automatically. Just run npm install without any additional flags.
If ESLint is not configured, you can remove it from lint-staged:
"lint-staged": {
"*.ts": [
"prettier --write"
]
}✅ Consistent Code Style - All code follows the same formatting rules ✅ Catch Errors Early - Find issues before they reach the repository ✅ Automated - No manual formatting needed ✅ Team Collaboration - Everyone follows the same standards ✅ D-Stack Compliance - Maintains high code quality standards