17 Commits
Author SHA1 Message Date
claude[bot]andClaude Opus 5.5 40ebdcc38d docs: fix code block line highlighting after docs reformats (#55097)
* docs: fix code block line highlighting after lint reformats

Several highlighted code blocks in the IPC and preload tutorials had their
line-highlight ranges drift when the docs code blocks were auto-formatted
(the `import/order` blank line added in #42113, and the if/else collapse in
#38260), so the highlights now land one line off from the code they were
meant to call out. Update the ranges to point back at the originally
highlighted code without changing the code blocks themselves.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E

* docs: fix code block line highlighting that drifted from content edits

The Playwright examples in automated-testing.md lost a line when their two
`require` statements were merged, leaving the highlights one line late, and
the code signing examples replaced a two-line certificate option with a
`windowsSign` object while keeping the old two-line ranges. Point the
highlights back at the intended code and cover the whole `windowsSign`
object.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 07:59:47 -04:00
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
Samuel AttardandClaude 5eefaea339 build: update @electron/lint-roller to 4.0.0 (#54139)
lint-roller 4 drops `lint-roller-markdown-standard` (and with it the
transitive eslint/standard dependency tree, roughly 1,900 lines of
yarn.lock) in favour of `lint-roller-markdown-oxlint`, which lints the JS
code blocks in docs/ with the repo's own oxlint and .oxlintrc.json. It
also makes `lint-roller-markdown-ts-check` work with TypeScript 6 and 7.

- `lint:js-in-markdown` now runs `lint-roller-markdown-oxlint`.
- `lint:docs-fiddles` ran the `standard` binary, which was only ever
  installed as a dependency of lint-roller 3, so it now runs oxlint over
  docs/fiddles instead. The dozen findings that surfaced (unused trailing
  callback parameters, one `require('path')`, one stale eslint-disable
  comment) are fixed in the fiddles, and the one tutorial that inlines an
  affected fiddle is kept in sync.
- The `<!-- eslint-... -->` HTML comments in docs were directives for
  lint-roller-markdown-standard and are removed, and the docs style guide
  no longer points at standard-markdown.

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-21 00:18:36 -07:00
Erick ZhaoandDilukshan d4cbd6cd7d docs: fix ipc highlight lines (#50169)
Co-authored-by: Dilukshan <65407969+dilukshann7@users.noreply.github.com>
2026-03-09 17:16:06 -07:00
Ronald Eddy Jr 459a88f788 docs: fix typos across tutorial documentation (#49736) 2026-02-17 14:47:45 -05:00
David Sanders 0d70389ccb chore: lint code blocks in docs with ESLint (#42113) 2025-05-29 12:45:26 -07:00
clintharris f3676ff975 docs: wording in IPC tutorial docs (#40555)
fix: wording in IPC tutorial docs
2023-11-22 15:19:54 +09:00
David Sanders 3d2a754531 chore: extend linting of code blocks in the docs (#40245)
* chore: extend linting of code blocks in the docs

* chore: combine lint:markdownlint and lint:markdown scripts
2023-11-21 16:50:08 +09:00
Milan BurdaandDavid Sanders b163187235 docs: avoid leaking the IpcRendererEvent in contextBridge examples (#40321)
* docs: avoid leaking the `IpcRendererEvent` in `contextBridge` examples

* Update docs/fiddles/ipc/pattern-3/preload.js

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/ipc.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/ipc.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2023-11-01 13:46:25 -04:00
Erick Zhao b8ac798344 docs: use node: imports for node core modules (#39681)
docs: use `node:` imports for node builtin modules
2023-08-30 11:55:23 -04:00
David Sanders 68701c4c3c chore: update @electron/lint-roller and improve doc type checks (#39262) 2023-07-31 10:39:01 +02:00
David Sanders 905aad9cb6 chore: type check JS in docs (#38423)
* build(deps): update @electron/lint-roller

* chore: type check JS in docs

* docs: add @ts-check and @ts-expect-error to code blocks

* chore: fix type check errors in docs

* chore: add ts-type to blocks
2023-06-05 16:26:26 +09:00
David Sanders eeb1e7d499 chore: fix lint:js-in-markdown script (#38260) 2023-05-15 09:58:35 +02:00
David Sanders d94f35a8f6 chore: disallow shortcut reference links in docs Markdown (#36860)
* chore: disallow shortcut reference links in docs Markdown

* docs: clean up shortcut-style links
2023-01-16 10:22:49 +01:00
Lalit e100402b13 docs: possible change in tutorial/ipc (#33218)
The `counter` channel should be `update-counter` channel
2022-03-21 11:13:55 +09:00
Abhay Gupta b274011720 fix: fiddle ipc code pattern 3 (#33262) 2022-03-16 11:01:29 -04:00
Erick ZhaoandJeremy Rose e9a43be9be docs: add IPC doc (#32059)
* docs: add IPC doc

* fix: use "string" primitive

* use 'string' ipcrenderer

* use "number" primitive

* Update docs/tutorial/ipc.md

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* Update docs/tutorial/ipc.md

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* add code sample

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-02-09 11:00:05 -05:00