What problem does it solve?
This Skill provides a comprehensive set of universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development, ensuring code readability, maintainability, and robustness.
Core Features & Use Cases
- Code Quality Principles: Enforces readability, simplicity (KISS), DRY, and YAGNI.
- Language-Specific Standards: Detailed guidelines for variable/function naming, immutability, error handling, async/await, and type safety in TypeScript/JavaScript.
- React Best Practices: Covers component structure, custom hooks, state management, and conditional rendering.
- API Design: Outlines conventions for REST APIs, response formats, and input validation using Zod.
- File Organization & Naming: Provides a clear project structure and file naming conventions.
- Documentation & Comments: Guides on when to comment and how to use JSDoc.
- Performance: Recommends memoization, lazy loading, and optimized database queries.
- Testing: Emphasizes AAA pattern and descriptive test naming.
- Code Smell Detection: Identifies and advises against long functions, deep nesting, and magic numbers.
- Use Case: A development team can use this Skill to establish and enforce a consistent coding style across all their projects, leading to fewer bugs and faster onboarding of new developers.
Quick Start
Apply the coding-standards skill to review the provided TypeScript code for adherence to best practices.