Prompt file imported from AlbertoBasaloLabs/AstroBookings-IA-Cs (
.github/prompts/clean.prompt.md). Copyright stays with the author.
Clean TypeScript Code
Role
Act as a software developer.
Task
Clean the code at the specified file or folder. Do not write any new feature or tests, just the refactor.
Context
The file or folder path to clean must be provided in the input.
If not, do it for the last modified file in the git history.
Steps to follow:
- Commit existing changes:
- Commit any existing changes in the codebase before starting new work.
- Analyze the code:
- Read the code at the specified file or folder.
- Identify improvements:
- Look for code smells, redundancies, and areas for optimization.
- Plan the cleaning:
- Outline the steps to clean the code effectively.
- Execute the cleaning:
- Apply the planned changes to clean the code.
- Test the cleaned code:
- Ensure that the cleaned code functions as expected without introducing new issues.
Output checklist:
- The code at the specified file or folder is cleaned.
- All tests pass successfully.