ts-coding-skill

Enforces a TypeScript Node.js coding standard covering type safety and functional patterns.

1|Updated Nov 26, 2014
One-click install
npx skills add https://github.com/tianhuil/dotfiles --skill ts-coding-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-coding-skill
Source: https://github.com/tianhuil/dotfiles/tree/main/home/.config/opencode/skills/ts-coding-skill
Command: npx skills add https://github.com/tianhuil/dotfiles --skill ts-coding-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript Node.js projects often suffer from inconsistent styles and unclear guidelines. This skill provides a comprehensive style guide with best practices to improve readability and maintainability.

Core Features & Use Cases

  • Style guidelines covering type safety, functional patterns, docs, and testing
  • Examples demonstrating correct and incorrect usage
  • Use case: apply the guide to standardize a codebase across multiple repos

Quick Start

Follow the guidelines to rewrite a function to use explicit types and functional patterns.

Frequently Asked Questions about ts-coding-skill

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

FAQPage Schema
How do I enforce a consistent TypeScript Node.js coding standard across multiple repositories?

To enforce a consistent TypeScript Node.js coding standard across multiple repositories, apply a comprehensive style guide covering type safety, functional patterns, validation, and linting. This codifies practices to improve code readability and maintainability throughout your projects.

What are the best practices for improving type safety in Node.js TypeScript projects?

Best practices for improving type safety in Node.js TypeScript projects involve using explicit types and applying functional patterns. Following these style guidelines ensures clear code behavior, reduces runtime errors, and significantly enhances overall project maintainability.

How do I rewrite a TypeScript function to use explicit types and functional patterns?

To rewrite a TypeScript function with explicit types and functional patterns, follow the provided coding guidelines and examples. These demonstrate correct and incorrect usage, helping you refactor existing code for better type consistency and readability.

Can I standardize my codebase using functional patterns and linting in TypeScript Node.js?

Yes, you can standardize your codebase using functional patterns and linting in TypeScript Node.js. Applying a standardized style guide with contextual examples ensures consistent coding practices and improves long-term maintainability across your project.

Does this TypeScript coding standard include examples of incorrect usage?

Yes, this TypeScript coding standard includes examples demonstrating both correct and incorrect usage. These examples provide contextual guidance during coding sessions to help developers avoid common pitfalls and maintain a consistent style across the codebase.