lukeed/tidyPublic

feat: format JS template embeds

CSS, GraphQL, Markdown and HTML in JS templates are formatted as
Prettier does by default, through tidy's own formatters. Their doc
streams become JS IR, so the template's real column and width apply.
46 of 50 embed fixtures match Prettier (19 before). The JS oracle
passed formatEmbedded, which the binding ignores; it passes embedded
now, and --embedded turns embedding on for both tools.
LELuke Edwards authored
a20c51bPatch
Parent73675b9
16 files changed+911-650
StackedSplit
crates/tidy/src/graphql/mod.rs+25 −0
crates/tidy/src/graphql/print.rs+6 −0
crates/tidy/src/html/mod.rs+55 −0
crates/tidy/src/js/PROVENANCE.md+1 −0
crates/tidy/src/js/detached/embed.rs+0 −49
crates/tidy/src/js/embed/css.rs+76 −279
crates/tidy/src/js/embed/doc.rs+348 −0
crates/tidy/src/js/embed/graphql.rs+102 −33
crates/tidy/src/js/embed/html.rs+101 −110
crates/tidy/src/js/embed/markdown.rs+89 −170
crates/tidy/src/js/embed/mod.rs+45 −0
crates/tidy/src/js/mod.rs+0 −1
crates/tidy/src/js/options.rs+0 −2
crates/tidy/tests/js_embed.rs+55 −0
mise.toml+1 −1
tests/oracle/js.ts+7 −5