返回 Skill 列表
extension
分类: 开发与工程无需 API Key

plan-fix-linter-error

此技能应在修复代码库中一个或多个ESLint规则的所有违规情况时使用。它运行代码检查工具,按规则和文件对违规情况进行分组,生成包含修复策略的简报,并制定实施修复的任务计划。

person作者: jakexiaohubgithub

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:
    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.