coding-standards

Provide coding standards and best practices for TypeScript, JavaScript, React, and Node.js.

Updated Sep 9, 2024
One-click install
npx skills add https://github.com/anyulled/my-portfolio-website --skill coding-standards-anyulled
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/anyulled/my-portfolio-website/tree/main/.agent/skills/coding-standards
Command: npx skills add https://github.com/anyulled/my-portfolio-website --skill coding-standards-anyulled

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes and enforces universal coding standards, best practices, and patterns across TypeScript, JavaScript, React, and Node.js development, ensuring code readability, maintainability, and efficiency.

Core Features & Use Cases

  • Code Quality Principles: Enforces readability, simplicity (KISS), don't repeat yourself (DRY), and you ain't gonna need it (YAGNI).
  • Language-Specific Standards: Provides detailed guidelines for TypeScript/JavaScript (naming, immutability, error handling, async/await, type safety), React (component structure, custom hooks, state management, conditional rendering), and API design (REST conventions, response formats, input validation).
  • Use Case: A new developer joins a project and needs to understand the established coding conventions. They can refer to this Skill's documentation to quickly align with best practices for naming variables, handling errors, structuring React components, and designing API responses, ensuring consistency across the codebase.

Quick Start

Review the TypeScript/JavaScript variable naming conventions to ensure clear and descriptive code.

Frequently Asked Questions about coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for structuring React components and managing state?

Best practices for structuring React components include enforcing clear component structure, utilizing custom hooks, and implementing proper state management and conditional rendering to improve readability and maintainability across your project.

How do I design REST API responses and validate inputs in Node.js?

Design REST API responses in Node.js by adhering to REST conventions, standardizing response formats, and implementing rigorous input validation to ensure consistent API design and robust backend architecture.

What TypeScript coding standards should I follow for type safety and async operations?

TypeScript coding standards dictate using clear naming conventions, enforcing immutability, handling errors properly, utilizing async/await, and maintaining strict type safety to elevate code quality and consistency.

How do I identify code smells and apply KISS, DRY, and YAGNI principles in JavaScript?

Identify code smells in JavaScript by applying core code quality principles: keep it simple (KISS), don't repeat yourself (DRY), and you ain't gonna need it (YAGNI) to ensure maintainable and efficient development.

Does this coding standards guideline cover performance optimization and testing for Node.js?

Yes, these coding standards cover performance optimization and testing for Node.js, providing comprehensive guidelines to detect code smells, improve execution efficiency, and maintain high code quality across your stack.