typescript-conventions

Enforce TypeScript coding conventions for frontend development with ESLint and Prettier.

2.5k|507|Updated Feb 7, 2014
One-click install
npx skills add https://github.com/exceptionless/Exceptionless --skill typescript-conventions-exceptionless
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-conventions
Source: https://github.com/exceptionless/Exceptionless/tree/main/.agents/skills/typescript-conventions
Command: npx skills add https://github.com/exceptionless/Exceptionless --skill typescript-conventions-exceptionless

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that all TypeScript code adheres to established project conventions, improving code quality, maintainability, and consistency across the codebase.

Core Features & Use Cases

  • Code Style Enforcement: Guarantees adherence to formatting rules defined by ESLint and Prettier.
  • Naming Conventions: Enforces kebab-case for files and directories, and specific naming for interfaces.
  • Type Safety: Promotes the avoidance of any types and encourages the use of type guards and discriminated unions.
  • Import Management: Encourages named imports and defines allowed exceptions for namespace imports.
  • Promise & Error Handling: Mandates awaiting promises and proper try/catch blocks.
  • Control Flow Braces: Requires braces for all single-line control statements.
  • Use Case: When writing new TypeScript components or reviewing pull requests, this skill helps maintain a uniform and robust codebase.

Quick Start

Apply the typescript-conventions skill to ensure the new file user-service.ts follows project naming and type safety guidelines.

Frequently Asked Questions about typescript-conventions

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

FAQPage Schema
How do I enforce TypeScript coding conventions for frontend development?

You can enforce TypeScript coding conventions by applying rules for file naming, import patterns, type safety, and error handling, ensuring adherence to best practices for maintainable and scalable codebases.

What is the best way to avoid any types and improve type safety in TypeScript?

To improve type safety, avoid using any types and instead encourage the use of type guards and discriminated unions to enforce strict typing across your frontend codebase.

How do I configure ESLint and Prettier for TypeScript code style enforcement?

Configure ESLint and Prettier to guarantee adherence to formatting rules, requiring braces for all single-line control statements and enforcing kebab-case for files and directories.

Does this TypeScript convention enforcement handle promise and error handling?

Yes, TypeScript convention enforcement mandates awaiting promises and implementing proper try/catch blocks to ensure robust error handling throughout the project.

Can I use these TypeScript conventions for naming interfaces and managing imports?

Yes, these conventions enforce specific naming for interfaces, encourage named imports, and define allowed exceptions for namespace imports to maintain codebase consistency.