1.1 KiB
| description |
|---|
| Clean up code — remove debug artifacts, format, sort imports, fix lint issues |
Clean
When the user runs this command, clean the specified files or directories (or recently modified files if none given).
Cleanup Pipeline
-
Remove debug code — Strip console.log, debugger statements, commented-out code blocks, and temporary debugging artifacts.
-
Format — Run the project's formatter if available (e.g.,
prettier,rustfmt,gofmt,black,shfmt). Otherwise apply consistent indentation and spacing manually. -
Optimize imports — Sort, group, and remove unused imports. Use absolute paths where the project convention dictates.
-
Fix lint issues — Run the project's linter with auto-fix if available. Report any issues that need manual attention.
-
Type validation — Run the project's type checker if available. Fix obvious type issues.
-
Tidy comments — Remove redundant or obvious comments. Improve unclear ones. Ensure public APIs have doc comments matching the language convention.
Report
Summarize files processed, actions taken, and any issues requiring manual intervention.