fix-linting

Diagnose and resolve Angular ESLint violations by grouping errors into root-cause clusters.

Updated May 2, 2024
One-click install
npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill fix-linting-cman131
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fix-linting
Source: https://github.com/cman131/EatSomethingSourWhenYoureTired/tree/main/.claude/skills/fix-linting
Command: npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill fix-linting-cman131

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When ng lint reports dozens of ESLint errors across many files, fixing them one-by-one in file order misses shared root causes and multiplies the work. This Skill provides a systematic technique to collapse many violations into a few targeted fixes. ## Core Features & Use Cases - Rule-Based Clustering: Re-pivot lint output by ESLint rule name instead of file order to reveal error clusters and their shared causes. - Diagnostic Signal Interpretation: Distinguish "error typed" messages (broken imports, structural problems) from "any typed" messages (loose typing like as any casts) to prioritize fixes correctly. - Root-Cause Fix Patterns: Match common rules (no-unsafe-*, no-explicit-any, no-deprecated, no-duplicate-imports) to their typical root causes and correct fixes. - Use Case: After upgrading a SKY-UX dependency, ng lint reports 50 errors in 8 files. Group them by rule, discover a dead import path is cascading type errors into 4 spec files, delete the dead imports, and clear all 4 errors with one fix per file. ## Quick Start Run ng lint, group the reported errors by ESLint rule name, and fix each cluster's root cause one at a time, re-running lint after every fix.

Frequently Asked Questions about fix-linting

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

FAQPage Schema
How do I fix many ESLint errors across multiple files efficiently?▼

Group the lint output by ESLint rule name instead of fixing errors in file order. Each rule cluster usually traces back to one root cause, so a single targeted fix can clear 4 to 10 errors at once. Re-run lint after each fix to keep the count accurate.

What is the difference between error typed and any typed ESLint messages?▼

An "error typed value" message means a TypeScript type error is cascading, usually from a broken or unresolved import, so investigate the import chain. An "any typed value" message means loose typing from an `as any` cast or untyped spy, fixed at the typing source.

How do I fix no-unsafe-assignment errors caused by a broken import?▼

Broken imports from deleted or renamed modules resolve to an error type that cascades into surrounding code. Remove the dead import along with every usage, such as TestBed providers or stubs, rather than adding type casts.

Should I migrate or suppress no-deprecated ESLint warnings?▼

First determine whether the team deliberately kept the deprecated API. If unintentional, migrate to the recommended replacement. If deliberate, suppress with an eslint-disable-next-line comment at each usage site, since the rule fires at usages, not import lines.

Why does adding as any to silence a type error create more lint errors?▼

An `as any` cast introduces new no-unsafe-* violations because the value becomes untyped. Use `as unknown as T` with a scoped type alias instead, which satisfies the compiler without triggering unsafe-type rules.

When should I not use a cluster-based lint fixing approach?▼

Skip the clustering technique when there is only a single error in a single file; just fix it directly. The grouping and root-cause analysis overhead only pays off when errors span multiple rules and files.