Qualityprompt onlyIntermediate

Lint Until Clean

Automatically iterates through lint error detection and resolution until the codebase passes linting with zero issues. This loop ensures code quality and consistency by having the agent fix problems as they are identified.

← all loops
lintqualitycode-standardsautomationnpmjavascript

Goal

Remove all lint errors from the codebase

How to Run

Execute this loop in your preferred AI coding agent (Cursor, Claude Code, etc.) by providing the kickoff prompt. The agent will handle the rest.

  1. 01

    Prepare Environment

    Ensure you're in a project directory with a valid package.json containing a 'lint' script.

  2. 02

    Run Kickoff Prompt

    Provide the kickoff prompt to your AI agent to initiate the loop.

  3. 03

    Let Agent Iterate

    Allow the agent to automatically run checks, analyze errors, and apply fixes up to 10 times.

Workflow Steps

  1. 01

    Run Lint Check

    Execute npm run lint to identify current lint issues in the codebase.

  2. 02

    Analyze Errors

    Parse the lint output to determine which files need fixing and what specific rules are violated.

  3. 03

    Apply Fixes

    Modify code to resolve identified lint errors while preserving intended behavior and style.

  4. 04

    Validate Changes

    Re-run the lint check to confirm issues have been resolved.

Kickoff Prompt

Start the "Lint Until Clean" loop.

Goal: Remove all lint errors from the codebase
Max iterations: 10
Between iterations run: npm run lint
Exit when: Zero lint issues reported


Please run 'npm run lint' to check for errors. For each file with lint issues, make targeted fixes to resolve them. After each round of fixes, re-run the lint command to verify progress. Continue this process until either all lint errors are resolved or you've completed 10 iterations, whichever comes first.

Self-pace this loop. After each iteration, run `npm run lint` and evaluate the output, and only continue if the exit condition is not met (Zero lint issues reported). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Only modify files directly related to lint errors
  • ·Avoid changes that alter existing functionality or behavior
  • ·Do not run arbitrary shell commands outside of the check command
  • ·Preserve existing formatting unless explicitly required for lint compliance

Flow Diagram

rendering…

Related loops — Quality