fix-errors
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFix Errors
修复错误
Fix all ESLint and TypeScript errors by breaking them into areas and processing in parallel.
通过将错误划分到不同区域并进行并行处理,修复所有ESLint和TypeScript错误。
Workflow
工作流程
-
DISCOVER COMMANDS: Checkfor exact script names
package.json- Look for: ,
lint,typecheck,type-check,tsc,eslint,prettierformat
- Look for:
-
RUN DIAGNOSTICS:
- Run (or equivalent)
pnpm run lint - Run or
pnpm run typechecktsc --noEmit - Capture all error output
- Run
-
ANALYZE ERRORS:
- Extract file paths from error messages
- Group errors by file location
- Count total errors and affected files
-
CREATE ERROR AREAS:
- MAX 5 FILES PER AREA
- Group related files together (same directory/feature)
- Example:
Area 1: [file1, file2, file3, file4, file5]
-
PARALLEL PROCESSING: Launch snipper agents for each area
- Use Task tool with multiple agents simultaneously
- Each agent processes one area (max 5 files)
- Provide specific error details for each file
-
VERIFICATION: Re-run diagnostics after fixes
- Wait for all agents to complete
- Re-run lint and typecheck
- Report remaining errors
-
FORMAT CODE: Apply Prettier (if available)
- Run or equivalent
pnpm run format
- Run
-
查找命令:检查获取准确的脚本名称
package.json- 查找以下脚本:、
lint、typecheck、type-check、tsc、eslint、prettierformat
- 查找以下脚本:
-
运行诊断:
- 运行(或等效命令)
pnpm run lint - 运行或
pnpm run typechecktsc --noEmit - 捕获所有错误输出
- 运行
-
分析错误:
- 从错误信息中提取文件路径
- 按文件位置对错误进行分组
- 统计错误总数和受影响的文件数量
-
创建错误处理区域:
- 每个区域最多5个文件
- 将相关文件分组到一起(同一目录/功能模块)
- 示例:
区域1: [file1, file2, file3, file4, file5]
-
并行处理:为每个区域启动snipper agents
- 使用Task工具同时启动多个agents
- 每个agent处理一个区域(最多5个文件)
- 为每个文件提供具体的错误详情
-
验证:修复完成后重新运行诊断
- 等待所有agents完成任务
- 重新运行lint和typecheck
- 报告剩余错误
-
格式化代码:应用Prettier格式化(如果可用)
- 运行或等效命令
pnpm run format
- 运行
Snipper Agent Instructions
Snipper Agent 说明
Fix all ESLint and TypeScript errors in these files:
[list of files with their specific errors]
Focus only on these files. Make minimal changes to fix errors while preserving functionality.Fix all ESLint and TypeScript errors in these files:
[list of files with their specific errors]
Focus only on these files. Make minimal changes to fix errors while preserving functionality.Rules
规则
- ALWAYS check package.json first for correct commands
- ONLY fix linting and TypeScript errors
- NO feature additions - minimal fixes only
- PARALLEL ONLY - use Task tool for concurrent processing
- Every error must be assigned to an area
User: $ARGUMENTS
- 始终先检查package.json获取正确的命令
- 仅修复linting和TypeScript错误
- 禁止添加新功能 - 仅做最小必要修复
- 必须并行处理 - 使用Task工具进行并发处理
- 每个错误都必须分配到对应的处理区域
用户:$ARGUMENTS