Lint and Validate Skill
Overview
This skill provides comprehensive quality control mechanisms for software development workflows. It ensures code integrity through systematic linting, validation, and static analysis procedures that maintain project standards across multiple programming ecosystems.
The quality assurance framework operates continuously throughout the development lifecycle, catching potential issues before they impact production systems. By automating these processes, teams can maintain high code quality while reducing manual review overhead.
Usage
Operational Workflow
- Code Modification Phase: Execute validation tools following any code changes to maintain consistency.
- Audit Execution: Run comprehensive checks using ecosystem-specific commands.
- Report Analysis: Review audit findings to identify areas requiring attention.
- Continuous Improvement: Implement fixes and validate resolution before task completion.
Tool Integration
- Node.js/TypeScript: Leverage ESLint for code quality and TypeScript for type safety.
- Python: Utilize Ruff for modern linting and Bandit for security analysis.
- Cross-Platform: Maintain configuration files (.eslintrc, tsconfig.json, pyproject.toml) for consistent behavior.
Guidelines
Quality Standards
- Linting Requirements: Address style and syntax issues promptly to maintain code readability.
- Type Safety: Resolve type mismatches before deployment to ensure runtime reliability.
- Security Compliance: Conduct regular audits to identify and mitigate potential vulnerabilities.
Implementation Guidelines
- Proactive Monitoring: Establish automated checks that trigger on code modifications.
- Documentation Standards: Maintain clear documentation alongside code artifacts.
- Feedback Loops: Create mechanisms for continuous improvement based on audit outcomes.
Examples
Sample Commands
# Node.js ecosystem
npm run lint
npx eslint "path" --fix
npx tsc --noEmit
# Python ecosystem
ruff check "path" --fix
bandit -r "path" -ll
mypy "path"
Expected Outcomes
- Error-Free Code: All commits pass validation checks without failures.
- Consistent Standards: Code adheres to defined quality metrics and best practices.
- Actionable Insights: Audit reports provide clear recommendations for ongoing improvement.
Strict Rule: No code should be committed or reported as "done" without passing these checks.
Scripts
| Script | Purpose | Command |
|---|---|---|
scripts/lint_runner.py |
Unified lint check | python scripts/lint_runner.py <project_path> |
scripts/type_coverage.py |
Type coverage analysis | python scripts/type_coverage.py <project_path> |