lint

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Run linting: $ARGUMENTS
运行代码检查:$ARGUMENTS

Instructions

操作说明

  1. Parse arguments:
    • backend
      or
      be
      → Run .NET analyzers
    • frontend
      or
      fe
      → Run ESLint/Prettier
    • fix
      → Auto-fix issues where possible
    • No argument → Run both, report only
  2. For Backend (.NET):
    bash
    dotnet build EasyPlatform.sln /p:TreatWarningsAsErrors=false
    • Check for analyzer warnings (CA*, IDE*, etc.)
    • Report code style violations
  3. For Frontend (Angular/Nx):
    bash
    cd src/Frontend
    nx lint playground-text-snippet
    nx lint platform-core
    With auto-fix:
    bash
    nx lint playground-text-snippet --fix
    npx prettier --write "apps/**/*.{ts,html,scss}" "libs/**/*.{ts,html,scss}"
  4. Report format:
    • Group issues by severity (error, warning, info)
    • Show file paths and line numbers
    • Suggest fixes for common issues
  5. Auto-fix behavior:
    • If
      fix
      argument provided, apply safe auto-fixes
    • Report what was fixed vs what needs manual attention
  1. 解析参数:
    • backend
      be
      → 运行.NET分析器
    • frontend
      fe
      → 运行ESLint/Prettier
    • fix
      → 尽可能自动修复问题
    • 无参数 → 同时运行前后端检查,仅生成报告
  2. 针对后端(.NET):
    bash
    dotnet build EasyPlatform.sln /p:TreatWarningsAsErrors=false
    • 检查分析器警告(CA*, IDE*, etc.)
    • 报告代码风格违规问题
  3. 针对前端(Angular/Nx):
    bash
    cd src/Frontend
    nx lint playground-text-snippet
    nx lint platform-core
    启用自动修复:
    bash
    nx lint playground-text-snippet --fix
    npx prettier --write "apps/**/*.{ts,html,scss}" "libs/**/*.{ts,html,scss}"
  4. 报告格式:
    • 按问题严重程度分组(错误、警告、信息)
    • 显示文件路径和行号
    • 为常见问题提供修复建议
  5. 自动修复行为:
    • 如果提供
      fix
      参数,应用安全的自动修复
    • 报告已修复内容与需手动处理的内容

IMPORTANT Task Planning Notes

重要任务规划注意事项

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
  • 始终规划并拆分为多个小型待办任务
  • 始终添加最终审查待办任务,在结束时检查已完成的工作,以发现任何需要修复或优化的地方