Skip to content

Commit 4986613

Browse files
committed
docs(formatter_json): update AGENTS.md (#23199)
1 parent 769de65 commit 4986613

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎crates/oxc_formatter_json/AGENTS.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
Prettier compatible JSON/JSONC/JSON5 formatter (`oxfmt`'s Tier 1 backend), using the `oxc_formatter_core` APIs.
5+
Prettier compatible JSON/JSONC/JSON5/JSON.stringify formatter (`oxfmt`'s Tier 1 backend), using the `oxc_formatter_core` APIs.
66

77
- Built on `oxc_formatter_core` for the language-agnostic IR + Printer + builders + macros
88
- See `crates/oxc_formatter_core/AGENTS.md` for the IR/pipeline details
@@ -48,16 +48,17 @@ Run `clippy` and resolve all warnings.
4848

4949
### Fixtures tests
5050

51-
Snapshot tests driven by fixture files under `tests/fixtures/json/`.
51+
Snapshot tests driven by fixture files under `tests/fixtures/{json,jsonc,json5,json-stringify}/` (one directory per variant).
5252
`build.rs` auto-generates a test case from every `.{json,jsonc,json5}` file using the core `test_support` harness.
53+
Each directory's `options.json` sets the `variant` (and any per-case options); `json-stringify` fixtures use the `.json` extension.
5354

5455
```sh
5556
cargo test -p oxc_formatter_json
5657
# Review / accept snapshots after intentional changes
5758
cargo insta review -p oxc_formatter_json
5859
```
5960

60-
Add a case by dropping a new file into `tests/fixtures/json/`, the build script picks it up.
61+
Add a case by dropping a new file into the matching variant directory, the build script picks it up.
6162

6263
### Prettier conformance
6364

0 commit comments

Comments
 (0)