type-fix

Resolve TypeScript and ESLint errors by aligning code with types.

4|Updated Jan 12, 2017
One-click install
npx skills add https://github.com/brandon-fryslie/dotfiles --skill type-fix-brandon-fryslie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-fix
Source: https://github.com/brandon-fryslie/dotfiles/tree/main/config/claude/skills/type-fix
Command: npx skills add https://github.com/brandon-fryslie/dotfiles --skill type-fix-brandon-fryslie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses TypeScript and ESLint errors by aligning code and types, ensuring that errors are fixed correctly, not just silenced.

Core Features & Use Cases

  • Type Alignment: Automatically resolves type-related errors between TypeScript and ESLint, focusing on correct program descriptions.
  • Misalignment Resolution: Provides a diagnostic loop for identifying and correcting code misalignments at their source.
  • Catalog of Fixes: Includes a growing collection of real-world examples with verbatim broken code, diagnoses, fixes, and explanations.
  • Forbidden Moves List: Outlines moves like casting or ignoring errors that are not acceptable fixes.

Quick Start

To initiate the type-fix skill, run 'typefix' in the terminal with your TypeScript project as context.

Frequently Asked Questions about type-fix

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

FAQPage Schema
How do I fix TypeScript and ESLint type alignment errors without silencing them?

TypeScript and ESLint type alignment is resolved by diagnosing the exact source of the misalignment and correcting the code to match accurate program types, rather than silencing the errors. This prevents hidden bugs by ensuring the implementation strictly follows the defined type structure.

Why does casting a TypeScript variable not fix my type alignment issue?

Casting does not fix type alignment because it is a forbidden move that forcefully overrides the compiler without resolving the underlying structural mismatch. True fixes require adjusting the code or type definitions so they naturally align without toxic workarounds like casting or ignoring errors.

What is the best way to diagnose TypeScript ESLint misalignment at its source?

The best way to diagnose TypeScript ESLint misalignment is to follow a structured diagnostic loop that identifies exactly where the code deviates from the expected types. This process isolates the root cause of the misalignment to apply a precise fix rather than a superficial patch.

Can I use type-fix to enforce code quality in my development workflow?

Yes, you can use this approach to enforce code quality in development workflows requiring robust type alignment. It provides diagnostic steps and a catalog of real-world fixes to systematically resolve misalignments and maintain strict type integrity across your project.

How do I start resolving type errors using the type-fix skill?

To start resolving type errors with the type-fix skill, run the 'typefix' command in your terminal with your TypeScript project provided as the context. This initiates the diagnostic process to align your code with the expected types.