typescript-rules

Enforce TypeScript and React coding rules for components, types, and state.

2|1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/tundraray/overture --skill typescript-rules-tundraray
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-rules
Source: https://github.com/tundraray/overture/tree/main/skills/typescript-rules
Command: npx skills add https://github.com/tundraray/overture --skill typescript-rules-tundraray

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill codifies frontend TypeScript and React guidelines to prevent type-related defects and inconsistent component design across teams.

Core Features & Use Cases

  • Type safety enforcement: disallow any, require type guards for external data.
  • Props & Component Design: define Props interfaces, prefer functional components and co-location.
  • State & Data Flow: immutable updates, unidirectional data flow, and robust error handling.
  • Consistent Patterns: ensure consistent patterns across projects and teams.

Quick Start

Apply these rules when starting a new React + TypeScript feature: define a Props interface, implement a Function Component, replace any with unknown + type guards, and ensure state updates are immutable.

Frequently Asked Questions about typescript-rules

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

FAQPage Schema
How do I enforce type safety in React and avoid using any in TypeScript components?

To enforce type safety in React, you must disallow the any type and replace it with unknown. You then implement type guards to validate external data before rendering, preventing type-related defects in your UI components.

What is the best way to define Props interfaces for React TypeScript components?

The best way to define Props is to create explicit Props interfaces co-located with your functional components. This ensures strict typing for component inputs and maintains consistent design patterns across your React project.

How do I manage state and data flow safely in a React TypeScript application?

To manage state safely in React, enforce immutable state updates and unidirectional data flow. This functional approach prevents accidental state mutations and ensures robust error handling during data fetching operations.

Do I need type guards for external data fetching in React TypeScript projects?

Yes, you need type guards for external data fetching to ensure runtime type safety. Validating API responses with type guards prevents unverified data from entering your React components and causing type-related runtime errors.

Why should I use unknown instead of any when typing API responses in TypeScript?

You should use unknown instead of any because it forces explicit type checking through type guards. While any disables type checking entirely, unknown requires you to validate the external data shape before using it in your React components.

Can these TypeScript lint guidelines help maintain consistent patterns across frontend teams?

Yes, these TypeScript lint guidelines codify component patterns, props typing, and state management rules. Applying them ensures consistent React coding discipline and prevents inconsistent component design across multiple development teams.