Agent skill
eslint-fix
TypeScript/ESLint error fix guide, helps AI quickly locate and fix common lint errors, prioritizing auto-fix commands for formatting issues.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/eslint-fix
SKILL.md
Fix Workflow
Step 1: Run Lint Command
Before manual fixes, MUST run project lint command first:
pnpm lint
These issues are auto-fixed, no manual action needed:
- Import order
- Code formatting
- Whitespace/indentation
- Trailing commas
Step 2: Manually Fix Remaining Errors
Common Fix Rules
undefined Replacement
Use void 0 instead of undefined:
// bad
const value = undefined
// good
const value = void 0
No End-of-Line Comments
Comments MUST be above statements, absolutely forbidden at line end:
// bad
const name = 'test' // this is name
// good
// this is name
const name = 'test'
Nullish Coalescing
Prefer ?? over ||:
// bad
const value = input || 'default'
// good
const value = input ?? 'default'
Config Files
Do NOT modify eslint.config.js or eslint.config.ts unless necessary.
If config issues arise, only suggest modifications to user, do not edit config files directly.
Error Troubleshooting Priority
- Run
pnpm lintfor auto-fix - Check if above rules are violated
- Read specific error messages to locate issues
- If config adjustment needed, suggest user to modify manually
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?