typescript

Enforce strict TypeScript coding rules for type safety and maintainability.

9|Updated Jan 18, 2025
One-click install
npx skills add https://github.com/TheNordicOne/ngx-formbar --skill typescript-thenordicone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/TheNordicOne/ngx-formbar/tree/main/.claude/skills/typescript
Command: npx skills add https://github.com/TheNordicOne/ngx-formbar --skill typescript-thenordicone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents common TypeScript defects and code quality issues by enforcing strict, opinionated rules that improve correctness and readability during day-to-day development.

Core Features & Use Cases

  • Control flow clarity: Use early returns, avoid one-line guard patterns, and eliminate unnecessary else blocks.
  • Stronger type safety: Forbid any and non-null assertions, reduce casting, and rely on generics, type inference, and guards.
  • Consistent design patterns: Ban enums and enforce descriptive naming conventions for long-term maintainability.

Quick Start

Apply these rules when editing any .ts file to enforce consistent control flow, ban unsafe TypeScript patterns, and prefer descriptive naming.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce type safety and prevent unsafe patterns in TypeScript?

Enforce type safety in TypeScript by banning the any type, non-null assertions, and excessive casting, while relying on generics, type inference, and type guards to prevent defects and ensure correctness.

What is the best way to improve control flow clarity in TypeScript?

Improve control flow clarity by using early returns, avoiding one-line guard patterns, and eliminating unnecessary else blocks to create safer, more readable branching logic in your application code.

Why should I ban enums in my TypeScript code style?

Banning enums enforces consistent design patterns and improves long-term maintainability by preventing common TypeScript defects associated with enum handling in application code.

Does this TypeScript linting approach work with any .ts file?

Yes, this opinionated code style applies when editing any .ts file, automatically analyzing control flow, type safety, enum handling, and naming conventions to prevent maintainability issues.

How do I apply descriptive naming conventions in TypeScript?

Apply descriptive naming conventions by enforcing an opinionated code style that reduces type-unsafety and maintainability issues, ensuring variables and functions remain clear during day-to-day development.