-
Notifications
You must be signed in to change notification settings - Fork 653
feat(rome_json_formatter): Setup JSON Formatter crate #3854
Conversation
af67515
to
1902119
Compare
✅ Deploy Preview for docs-rometools canceled.
|
Comparing feat(rome_json_formatter): Setup JSON Formatter crate Snapshot #8 to median since last deploy of rome.tools.
1 page tested
|
Chrome Desktop | iPhone, 4G LTE | Motorola Moto G Power, 3G connection |
---|---|---|
Most significant changes
27 other significant changes: JS Parse & Compile on Chrome Desktop, Total Blocking Time on Chrome Desktop, Largest Contentful Paint on Motorola Moto G Power, 3G connection, First Contentful Paint on Motorola Moto G Power, 3G connection, Total CSS Size in Bytes on Chrome Desktop, Total CSS Size in Bytes on iPhone, 4G LTE, Total CSS Size in Bytes on Motorola Moto G Power, 3G connection, Time to Interactive on Motorola Moto G Power, 3G connection, Total Page Size in Bytes on Chrome Desktop, Total Page Size in Bytes on iPhone, 4G LTE, Total Page Size in Bytes on Motorola Moto G Power, 3G connection, Time to Interactive on Chrome Desktop, Largest Contentful Paint on Chrome Desktop, First Contentful Paint on Chrome Desktop, Number of Requests on Motorola Moto G Power, 3G connection, Number of Requests on Chrome Desktop, Number of Requests on iPhone, 4G LTE, Speed Index on Motorola Moto G Power, 3G connection, Time to Interactive on iPhone, 4G LTE, First Contentful Paint on iPhone, 4G LTE, Largest Contentful Paint on iPhone, 4G LTE, Speed Index on Chrome Desktop, Total HTML Size in Bytes on Chrome Desktop, Total HTML Size in Bytes on iPhone, 4G LTE, Total HTML Size in Bytes on Motorola Moto G Power, 3G connection, Lighthouse Performance Score on Motorola Moto G Power, 3G connection, Lighthouse Performance Score on Chrome Desktop
Calibre: Site dashboard | View this PR | Edit settings | View documentation
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
TODO add to benchmark after #3845 lands |
0c705d6
to
52bd3ec
Compare
Summary
This PR sets up the new
rome_json_formatter
crate with the "default" implementation for all formatters except literals (trivial) and the root.It adds:
JsonFormatContext
andJsonFormatOptions
JsonFormatter
JsonSyntaxNode
and blank implementations for each AST node.It enables json formatting support for debug builds only(There's an issue with the CLI now emitting linting is unsupported for JSON files. I'm going to tackle this in a dedicated PR)It changes:
Format*
nodes topub(crate)
. These are implementation details and shouldn't be publictraits_shared.rs
file inrome_formatter
and included it with theinclude
macro inrome_json_formatter
androme_js_formatter
Test Plan
I added a smoke test that calls into the formatter. A next step is to set up integration tests and prettier tests.