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

lint-typecheck

在前端代码库上运行ESLint和TypeScript类型检查。当用户提到“lint”、“type check”、“check code”、“eslint”、“tsc”,或是在提交更改之前使用。

person作者: jakexiaohubgithub

Lint and Type Check

Instructions

  1. Navigate to frontend directory and run lint:

    cd frontend && npm run lint
    
  2. Run TypeScript compilation check (no emit):

    cd frontend && npx tsc -b --noEmit
    
  3. If errors are found:

    • List all errors with file locations
    • Offer to fix auto-fixable ESLint issues: npm run lint -- --fix
    • For TypeScript errors, identify the type mismatches
  4. Report summary: X lint warnings, Y lint errors, Z type errors

Examples

  • "Run lint on the frontend"
  • "Check for type errors"
  • "Validate code before commit"

Guardrails

  • Run in read-only mode first; only apply --fix with user confirmation
  • Do not modify tsconfig.json to suppress errors
  • Report all issues before attempting fixes