Skip to content

Add auto-fix step to CI workflow for lint and formatting#2

Merged
nsheaps merged 1 commit intomainfrom
claude/enable-validation-auto-fix-EiWk1
Mar 5, 2026
Merged

Add auto-fix step to CI workflow for lint and formatting#2
nsheaps merged 1 commit intomainfrom
claude/enable-validation-auto-fix-EiWk1

Conversation

@nsheaps
Copy link
Copy Markdown
Owner

@nsheaps nsheaps commented Mar 5, 2026

Summary

This PR enhances the CI workflow to automatically fix lint and formatting issues before running the full lint check, reducing friction in the development process.

Key Changes

  • Enhanced checkout step: Added explicit ref and token configuration to the checkout action for better control over which branch is checked out
  • Auto-fix lint issues: Added a new step that runs npm run lint:fix to automatically correct linting violations
  • Auto-fix formatting issues: Added a new step that runs npm run check:fix to automatically correct formatting issues
  • Auto-commit fixes: Added a step that commits and pushes any auto-fixed changes back to the branch with a descriptive commit message, only if changes were made

Implementation Details

  • The auto-fix steps run before the main lint check, allowing the workflow to catch any remaining issues after automatic fixes
  • Git is configured with the github-actions[bot] user to make the auto-fix commits
  • The workflow includes a check to avoid creating empty commits when no auto-fixes are needed
  • Changes are automatically pushed back to the PR branch, keeping the branch up-to-date with formatting standards

https://claude.ai/code/session_018gvgrGDfMYGubkhj9WGTQy

Run eslint --fix and prettier --write before validation checks, automatically
committing any fixes back to the branch.

https://claude.ai/code/session_018gvgrGDfMYGubkhj9WGTQy
@nsheaps nsheaps marked this pull request as ready for review March 5, 2026 17:56
@nsheaps nsheaps merged commit 4c2c25b into main Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants