docs(formatter_json): update AGENTS.md (#22976)

This commit is contained in:
leaysgur committed 2026-06-05 07:17:39 +00:00
1 parent 502b04db3a
commit 04907211c2
1 file changed
+3 -2
+3 -2
View File
@@ -11,8 +11,9 @@ Prettier compatible JSON/JSONC/JSON5 formatter (`oxfmt`'s Tier 1 backend), using
- For Prettier, JSON is not spec compliant JSON
- They are subsets of JS expression syntax, so the comments, unquoted key, etc... are allowed as input
- A simplified, independent reimplementation that does not share `oxc_formatter`'s code
- But JSON is a subset of JS, so `oxc_formatter` (`crates/oxc_formatter/`) is the canonical reference
- For layout / comment / blank-line decisions when the simplified version is unclear or diverges from Prettier
- As a result, although Prettier's JSON (especially JSON5) behaves like JS, as a formatter implementation, they should be distinguished and kept from interfering with each other
- So, just use `oxc_formatter` (`crates/oxc_formatter/`) as the canonical reference
- For layout / comment / blank-line decisions when the simplified version is unclear or diverges from Prettier
### `JsonVariant`