mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
docs(formatter_css,fomatter_graphql,formatter_yaml): update AGENTS.md (#24821)
This commit is contained in:
1 parent
dbd5cfbbe4
commit
69126a0413
3 files changed
+9
-6
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user