What problem does it solve?
Inconsistent code style, linting errors, or failing tests can introduce bugs and technical debt, slowing down development and increasing maintenance costs. This Skill enforces a strict code quality gate, running essential checks (formatting, linting, testing) before every commit to ensure all code adheres to project standards and best practices.
Core Features & Use Cases
- Mandatory Pre-Commit Checks: Ensures code is formatted (Prettier), linted (ESLint), and all tests pass (Jest) before allowing a commit, preventing low-quality code from entering the repository.
- Security Best Practices: Guides on using
security-utils.js for safe DOM manipulation and avoiding common vulnerabilities like XSS, protecting your application and users.
- Automated Fixes: Provides scripts like
npm run format and npm run lint:fix to automatically resolve common style and linting issues, saving you manual effort.
- Use Case: Before committing any changes, activate this Skill. It will automatically format your code, fix linting errors, and execute all tests. If any critical issues remain, it will prevent the commit, ensuring only high-quality, secure code enters the repository.
Quick Start
Run essential quality checks before committing
npm run format:check && npm run lint && npm test
For a full quality gate, including coverage
npm run verify