check
Run TypeScript type-check and ESLint, then fix any errors found. Use when you need to validate code quality or fix linting issues.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
TypeScript and ESLint Check & Fix
Run TypeScript type-check and ESLint, then fix any errors found.
Instructions
-
Run the check command:
- Execute
npm run checkto run both TypeScript type-check and ESLint - Capture and analyze all errors and warnings
- Execute
-
If errors are found:
- Analyze each error carefully before making changes
-
Fix TypeScript errors:
- Resolve type mismatches
- Add missing type annotations
- Fix import/export issues
- Ensure proper null/undefined handling
-
Fix ESLint errors:
-
CRITICAL: For
no-unused-varserrors, DELETE unused code completely - DO NOT prefix variables with underscores - remove them instead
- Fix import order and formatting issues
- Resolve any other ESLint rule violations
-
CRITICAL: For
-
Use appropriate tools:
- Use
Edittool for file changes (not bash sed/awk) - Use
Readtool to examine files before editing - Make targeted, precise fixes
- Use
-
Re-run the check:
- After fixing errors, run
npm run checkagain - Verify all errors are resolved
- After fixing errors, run
-
Repeat until clean:
- Continue the fix-and-check cycle until
npm run checkpasses without errors - Report the final status
- Continue the fix-and-check cycle until
Project-Specific Guidelines
- Unused Code Policy: DELETE unused imports, variables, and parameters - don't prefix with underscores
-
Architecture: Follow
/src/directory structure with features, components, lib separation - Type Safety: Maintain proper TypeScript types throughout
- Code Quality: Ensure all fixes improve code quality, don't just silence errors
Success Criteria
- ✅
npm run checkcompletes with exit code 0 - ✅ No TypeScript errors
- ✅ No ESLint errors or warnings
- ✅ All unused code removed (not just prefixed)
- ✅ Code remains functional after fixes
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!