js-ts-best-practices
•published 2026/03/13
JavaScript and TypeScript best practices covering naming conventions, control flow, state management, TypeScript patterns (avoid any/enum, prefer type over interface), safety (input validation, assertions, error handling), performance optimization (reduce branching/looping, memoization, defer await, cache property access, storage API caching, avoid needless allocations, currying for hot paths), and documentation (JSDoc, comment markers). Use when writing JS/TS functions, refactoring code for performance, reviewing code quality, fixing type errors, optimizing loops or conditionals, adding validation, or improving error messages.
📦 Install Skill
Command line install
Install directly with the `skills` CLI.
npx skills add majiayu000/claude-skill-registry-data/data/js-ts-best-practicesFile Explorer
No file selected
Select a file to view its content

