docs(formatter_css,fomatter_graphql,formatter_yaml): update AGENTS.md (#24821)

This commit is contained in:
leaysgur committed 2026-07-23 05:22:31 +00:00
1 parent dbd5cfbbe4
commit 69126a0413
3 files changed
+9 -6

No files matched your search

+3 -2
View File
@@ -10,8 +10,9 @@ Prettier compatible CSS/SCSS/Less formatter (`oxfmt`'s Tier 1 backend), using th
- `format()`: standalone files (returns a printable `Formatted`)
- `format_to_ir()`: embedded use via the dispatcher (e.g. css-in-js);
tolerates `${}` placeholders and `TopLevelDeclaration`
- The canonical reference is Prettier's `src/language-css/printer-postcss.js`
- port its layout decisions, do not invent new ones
- The canonical reference is Prettier's OUTPUT (the conformance snapshots); its source is an analysis aid, not a porting target
- match its layout decisions, do not invent new ones
- never mirror its internal logic 1:1: pin behavior with fixtures, and keep implementation details of Prettier's code out of comments
- ONE exception: never reproduce output that changes program semantics
- See "Known divergences" section
+3 -2
View File
@@ -11,8 +11,9 @@ Prettier compatible GraphQL formatter (`oxfmt`'s Tier 1 backend), using the `oxc
- `format_to_ir()`: embedded use via the dispatcher (e.g. graphql-in-js);
allocates from the shared `EmbeddedContext` arena, emits no BOM / trailing newline,
and leaves `propagate_expand()` to the parent document
- The canonical reference is Prettier's `src/language-graphql/printer-graphql.js`
- port its layout decisions, do not invent new ones
- The canonical reference is Prettier's OUTPUT (the conformance snapshots); its source is an analysis aid, not a porting target
- match its layout decisions, do not invent new ones
- never mirror its internal logic 1:1: pin behavior with fixtures, and keep implementation details of Prettier's code out of comments
### Forked parser
+3 -2
View File
@@ -8,8 +8,9 @@ Prettier compatible YAML formatter (`oxfmt`'s Tier 1 backend), using the `oxc_fo
- See `crates/oxc_formatter_core/AGENTS.md` for the IR/pipeline details
- Two entry points (see their docs in `src/format.rs`):
`format()` for standalone files, `format_to_ir()` for embedded use via the dispatcher (e.g. yaml-in-markdown)
- The canonical reference is Prettier 3.9's `src/language-yaml/printer-yaml.js` + `print/*.js`
- port its layout decisions — EXCEPT where they are bugs or internally inconsistent (see below)
- The canonical reference is Prettier 3.9's OUTPUT (the conformance snapshots); its source is an analysis aid, not a porting target
- match its layout decisions — EXCEPT where they are bugs or internally inconsistent (see below)
- never mirror its internal logic 1:1: pin behavior with fixtures, and keep implementation details of Prettier's code out of comments
### Parser