Skip to content

chore: add prettier config and CI auto-formatter#166

Merged
yyovil merged 2 commits into
aoagents:mainfrom
yyovil:chore/prettier-ci
Jun 10, 2026
Merged

chore: add prettier config and CI auto-formatter#166
yyovil merged 2 commits into
aoagents:mainfrom
yyovil:chore/prettier-ci

Conversation

@yyovil

@yyovil yyovil commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What

Adds Prettier config with CI-driven auto-formatting. Splits the formatter setup out of #156 which bundled it with the React renderer (see review comment there).

How it works

  • .prettierrc — the only hand-written config (120-char print width, double quotes, trailing commas)
  • .prettierignore — excludes generated files (schema.ts, openapi.yaml), lockfiles, and backend/ (Go uses gofmt)
  • .github/workflows/prettier.yml — on every push to a non-main branch, runs prettier --write . and commits any changed files back via GITHUB_TOKEN

No local enforcement. No husky, no lint-staged. Developers never need to run Prettier. The formatted output shows up as a CI commit on the branch, not as local uncommitted changes.

GitHub Actions does not re-trigger workflows on commits made with GITHUB_TOKEN, so there is no feedback loop.

After merge

The first push to any feature branch will trigger a formatting pass over the whole codebase. That single CI commit is the mass-reformat — it comes from the bot, not from any developer's machine.

🤖 Generated with Claude Code

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Comment thread .envrc Outdated
@@ -1 +1,3 @@
use flake
entire enable --agent claude-code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this into a separate envrc file that stays only on my system and drop these suggested code changes. Rest of the team doesn't use entire cli for agent session audits.

Comment thread .prettierrc Outdated
@@ -0,0 +1,9 @@
{
"useTabs": false,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz useTabs. turn this to true.

Comment thread .github/workflows/sync-fork.yml Outdated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't belong here. It belongs to my fork only. out of PR's scope. remove this.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Adds .prettierrc and .prettierignore (config only, no local enforcement).
Formatting runs in CI via the prettier.yml workflow: on every push to a
non-main branch, Prettier rewrites changed files and commits the result back
using GITHUB_TOKEN. Developers never need to run Prettier locally.

Intentionally excludes husky/lint-staged — local pre-commit hooks are the
wrong layer for a formatter that the whole team doesn't need installed.

Also adds .envrc.local to .gitignore for personal local shell overrides.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 27336650d2ee
@yyovil yyovil force-pushed the chore/prettier-ci branch from a3dd606 to 5839fae Compare June 10, 2026 02:32

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

yyovil

This comment was marked as resolved.

@yyovil yyovil merged commit 5982051 into aoagents:main Jun 10, 2026
ashish921998 added a commit that referenced this pull request Jun 10, 2026
Resolves conflicts with main's prettier config + CI auto-formatter (#166):
- Adopt main's .prettierrc (tabs) — CI reformats every push, so the
  branch's spaces config would just get rewritten
- Take main's versions of frontend/src/landing/** (branch only had
  formatting changes there; now byte-identical to main)
- Keep the branch's frontend/package.json, tsconfig.json, main.ts
  (the Electron redesign), root package.json (husky/lint-staged), and
  .gstack/ gitignore entry; keep main's .envrc.local entry
- Reformat the branch's own files with prettier@3 exactly as CI does,
  so the auto-formatter has nothing to commit after push

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant