home / skills / codyswanngt / lisa / plan-fix-linter-error
This skill fixes ESLint violations across the codebase by analyzing errors, grouping by rule, and proposing actionable plan and tasks.
npx playbooks add skill codyswanngt/lisa --skill plan-fix-linter-errorReview the files below or copy the command above to add this skill to your agents.
---
name: plan-fix-linter-error
description: This skill should be used when fixing all violations of one or more ESLint rules across the codebase. It runs the linter, groups violations by rule and file, generates a brief with fix strategies, and creates a plan with tasks to implement the fixes.
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
---
# Fix Linter Errors
Target rules: $ARGUMENTS
If no arguments provided, prompt the user for at least one lint rule name.
## Step 1: Gather Requirements
1. **Parse rules** from $ARGUMENTS (space-separated)
2. **Run linter** to collect all violations:
```bash
bun run lint 2>&1
```
3. **Group violations** by rule, then by file, noting:
- File path and line numbers
- Violation count per file
- Sample error messages
## Step 2: Compile Brief and Delegate
Compile the gathered information into a structured brief:
```
Fix ESLint violations for rules: $ARGUMENTS
Violations by rule:
- [rule-name-1]: X total violations across Y files
- [file]: N violations (lines: ...)
- ...
- [rule-name-2]: X total violations across Y files
- ...
Fix strategies: extract functions, early returns, apply formatting, add types
Verification: `bun run lint 2>&1 | grep -E "($ARGUMENTS)" | wc -l` → Expected: 0
```
Invoke `/plan-execute` with this brief to create the implementation plan.
This skill automates planning to fix all violations of one or more ESLint rules across a TypeScript codebase. It runs the project linter, groups violations by rule and file, and produces a concise brief and task plan to implement fixes and verify zero remaining violations.
The skill parses one or more lint rule names and runs the linter (bun run lint) to collect all violations. It groups results by rule and then by file, recording file paths, line ranges, counts, and sample error messages. Finally it generates a brief with recommended fix strategies and a step-by-step implementation plan that can be handed off or executed.
What if I provide no rule names?
The skill will prompt you to supply at least one ESLint rule name; it needs specific targets to collect and group violations.
How does verification work?
The brief includes a verification command that reruns the linter and counts matching violations (bun run lint 2>&1 | grep -E "(rules)" | wc -l) with an expected result of 0 after fixes.