docs(AGENTS): add mandatory pre-commit format step#3920
docs(AGENTS): add mandatory pre-commit format step#3920desiree-np wants to merge 1 commit intomainfrom
Conversation
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
There was a problem hiding this comment.
Pull request overview
Adds explicit formatting guidance to the React package agent documentation to reduce CI Format job failures by ensuring contributors run the formatter locally before committing.
Changes:
- Introduces a mandatory “Pre-Commit Checklist” in
packages/react/AGENTS.mdwithformatandtscsteps. - Expands the “Available Commands” list to include
pnpm formatandpnpm format:check.
| Before **every** `git commit`, run these two commands — no exceptions: | ||
|
|
||
| ```bash | ||
| # 1. Format all changed source files |
There was a problem hiding this comment.
The comment says “Format all changed source files”, but @factorialco/f0-react’s format script runs oxfmt on src/ by default (i.e., it formats the whole package source tree unless args are provided). Consider rewording to avoid implying it only touches changed files, or pass explicit paths if that’s the intent.
| # 1. Format all changed source files | |
| # 1. Format the package source files |
| `oxfmt` rewrites whitespace, quote style, trailing commas, and import order — always run it last, | ||
| after all code edits are done, and include the resulting changes in the same commit. |
There was a problem hiding this comment.
This paragraph says to “always run [oxfmt] last”, but the checklist below runs tsc after format. Either clarify that “last” means “last step that modifies files”, or swap the command order to match the guidance.
| `oxfmt` rewrites whitespace, quote style, trailing commas, and import order — always run it last, | |
| after all code edits are done, and include the resulting changes in the same commit. | |
| `oxfmt` rewrites whitespace, quote style, trailing commas, and import order — always run it as the | |
| last step that modifies files, after all code edits are done, and include the resulting changes in the same commit. |
📦 Alpha Package Version PublishedUse Use |
🔍 Visual review for your branch is published 🔍Here are the links to: |
Coverage Report for packages/react
File CoverageNo changed files found. |
Summary
packages/react/AGENTS.mdthat makespnpm formatmandatory before every commitpnpm formatandpnpm format:checkto the Available Commands referenceWhy
Every PR has been failing the
FormatCI check becauseoxfmtwas not being run before committing. This documents the requirement explicitly so any AI agent (or human) working in this package knows to run it.