Files
electron/docs/tutorial
Samuel AttardandClaude ad3a896a52 build: check the formatting of docs code blocks with oxfmt (#54140)
* build: check the formatting of docs code blocks with oxfmt

lint-roller 4 splits the old `lint-roller-markdown-standard` into an
oxlint half and an oxfmt half. This wires up the second one:
`lint:fmt-in-markdown` runs `lint-roller-markdown-oxfmt` over docs/ as
part of `lint:docs`, using docs/.oxfmtrc.json, which matches the repo's
.oxfmtrc.json except that docs snippets keep their semicolon-free style.
`--fix` writes the formatted blocks back, and a block can opt out with
`@noformat` in its info string.

* docs: format code blocks with oxfmt

Result of `lint-roller-markdown-oxfmt --fix` with docs/.oxfmtrc.json, plus
the @ts-expect-error line anchors (and one Docusaurus highlight marker)
that moved with the reformat. The Babel output sample in the ESM guide and
the two excerpts of repo source in creating-api.md are marked @noformat,
and the contentTracing example passes an async callback instead of
wrapping an IIFE so that it does not need a leading semicolon.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-21 00:18:37 -07:00
..
2025-05-09 14:36:42 -07:00