[Tooling]: fix or remove the repo Prettier setup
Summary
Problem
The repository currently has partial Prettier wiring, but it is not a reliable developer tool.
Current state:
.prettierrcand.prettierignoreexist at the repo root, implying Prettier is part of the repo formatting policy.- The root
package.jsonhas noformatorformat:checkscript. - The root package has no direct Prettier dependency.
frontend/package.jsonalso has no Prettier script or direct Prettier dependency.- CI still has
.github/workflows/prettier.yml, but it runs Prettier through an ad hocnpx --yes prettier@3command instead of a checked-in script. - This means Prettier can fail PRs, but contributors do not have a stable local command that clearly matches CI.
This leaves the repo in an awkward middle state: either Prettier should be treated as a first-class tool, or it should be removed entirely.
Related narrower issue: #2280 covers generated-file rewrites from an older workflow shape. This issue is for deciding whether Prettier should exist as a supported repo tool at all.
Decision Needed
Pick one direction and make the repo consistent.
Option A: Keep and fix Prettier
- Add a direct Prettier devDependency in the package that owns the repo-level command, probably the root package.
- Add documented scripts, for example:
npm run formatnpm run format:check
- Update
.github/workflows/prettier.ymlto call the same script developers run locally, or clearly document why CI differs. - Make
.prettierignorecover all generated, vendor, scratch, and build-output paths that should never be formatted. - Add the command to the repo developer docs if it is part of the standard gate.
Option B: Remove Prettier entirely
- Delete
.prettierrc. - Delete
.prettierignore. - Delete
.github/workflows/prettier.yml. - Remove any docs that imply Prettier is part of the toolchain.
- Rely on existing formatters/checks instead:
gofmt/ Go CI for backend- TypeScript typecheck/build for frontend
- generator-owned output for generated files
Acceptance Criteria
- There is no partial Prettier setup left behind.
- Contributors either have a stable local Prettier command that matches CI, or there is no Prettier CI/config at all.
- Generated files and lockfiles are not formatter-owned unless explicitly intended.
- The chosen policy is documented in the repo's developer instructions.
Steps to reproduce
-
Check the repo root formatting config:
ls .prettierrc .prettierignore .github/workflows/prettier.yml -
Check the root package scripts:
npm run
-
Try to run an expected local formatter command:
npm run format:check npm run format
-
Check whether Prettier is a repo-owned dependency:
npm ls prettier
-
Compare that with CI:
cat .github/workflows/prettier.yml
Expected behavior
If Prettier is part of the repo policy, contributors should have a stable local command that matches CI, for example:
npm run format npm run format:check
The repo should also own the Prettier version through a direct devDependency, and generated files / lockfiles should be excluded deliberately.
Alternatively, if Prettier is not intended to be part of the repo policy, all Prettier config and CI should be removed.
Actual behavior
The repo is in a partial state:
- Prettier config exists.
- Prettier CI exists.
- CI can fail PRs for formatting.
- There is no root local format or format:check command.
- There is no direct root Prettier dependency.
- CI downloads Prettier ad hoc with npx --yes prettier@3.
- Contributors cannot reliably reproduce the CI check locally using a repo-owned command.
AO version
- AO CLI: ao version dev - Repo checkout: 693692467 - Frontend package version: 0.10.3 - Legacy npm CLI package version: 0.10.0
Environment
- OS: Microsoft Windows 10.0.26200 - Arch: x64 - Go: go1.24.5 windows/amd64 - Node: v26.3.0 - npm: 11.16.0
Logs / extra context
Before submitting
- [x] I searched existing issues for duplicates
- [x] I removed secrets / tokens from logs and screenshots
Hey @Vaibhaav-Tiwari — I'd like to take this on. Leaning toward Option B (remove Prettier entirely) since the repo already has gofmt/Go CI for the backend and TS typecheck/build for the frontend doing the real enforcement — Prettier here is unpinned (npx --yes prettier@3) and half-wired, so it's adding failure surface without owning any actual formatting guarantee. Happy to go with Option A instead if that's the maintainers' preference.
Plan if assigned:
Delete .prettierrc, .prettierignore, .github/workflows/prettier.yml Sweep docs for Prettier references Confirm no scripts in root or frontend/package.json reference it One PR, conventional commit (chore: remove partial prettier setup), following repo AGENTS.md conventions
Could I get this assigned to me?
Hey @Vaibhaav-Tiwari — I'd like to take this on. Leaning toward Option B (remove Prettier entirely) since the repo already has gofmt/Go CI for the backend and TS typecheck/build for the frontend doing the real enforcement — Prettier here is unpinned (npx --yes prettier@3) and half-wired, so it's adding failure surface without owning any actual formatting guarantee. Happy to go with Option A instead if that's the maintainers' preference.
Plan if assigned:
Delete .prettierrc, .prettierignore, .github/workflows/prettier.yml Sweep docs for Prettier references Confirm no scripts in root or frontend/package.json reference it One PR, conventional commit (chore: remove partial prettier setup), following repo AGENTS.md conventions
Could I get this assigned to me?
sure, create a proper PR with the plan and steps and i'll review it
@Vaibhaav-Tiwari just opened a PR: #3090 — went with Option B (remove Prettier entirely), matches the plan I outlined above. Ready for review whenever you get a chance.