Skip to content

build: update @electron/lint-roller to 4.0.0 and check docs code blocks with oxfmt (42-x-y) - #54160

Merged
MarshallOfSound merged 4 commits into
42-x-yfrom
claude/lint-roller-4-42-x-y
Sep 21, 2026
Merged

MarshallOfSound merged 4 commits into
42-x-yfrom
claude/lint-roller-4-42-x-y

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

Backport of #54107
Backport of #53431
Backport of #54139
Backport of #54140

See those PRs for details. The json5 code block change is the prerequisite that already landed on 43/44/45, the oxlint 1.80 bump comes along because lint-roller 4 needs oxlint >= 1.65, and the docs reformat was re-run on this branch's docs rather than cherry-picked.

Notes: none


Generated by Claude Code

claude Bot and others added 4 commits September 21, 2026 07:49
* docs: use json5 for bare object literal code blocks

Several docs code blocks contain only a bare object literal (an example
return value or options object) but are tagged as `js`. As JavaScript,
`{ key: value, ... }` on its own is a block statement, not an object, so
standard/ESLint reports "Parsing error: Unexpected token :" on most of
them; they only lint today because @electron/lint-roller special-cases
them with a regex that wraps orphan `{...}` blocks in parens before
linting. The blocks are valid JSON5, so tag them as such and drop the
`<!-- eslint-skip -->` comments that preceded them, which nothing in the
current tooling honors.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck

* docs: use json5 for bare array menu template blocks

The three menu template examples in docs/tutorial/menus.md are bare
array literals, not runnable JavaScript. Like the bare object literal
blocks in the previous commit, they are valid JSON5, so tag them as
such instead of `js`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck

* docs: use json5 for bare literal blocks nested in blockquotes

The radio menu item example in the `[!TIP]` blockquote in
docs/tutorial/menus.md is a bare array literal tagged `js`; it was
missed earlier because the fence is prefixed with `> `. It is valid
JSON5 (including the trailing `//` comment), so tag it json5 like the
other bare literal blocks.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck

---------

Co-authored-by: Claude <[email protected]>
(cherry picked from commit 2f64d2b)
* build(deps-dev): bump oxlint from 1.57.0 to 1.80.0

Bumps [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint) from 1.57.0 to 1.80.0.
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.80.0/npm/oxlint)

---
updated-dependencies:
- dependency-name: oxlint
  dependency-version: 1.80.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: satisfy lint rule

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <[email protected]>
(cherry picked from commit 633785d)
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 <[email protected]>
(cherry picked from commit 5eefaea)
* 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 <[email protected]>
(cherry picked from commit ad3a896)
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner September 21, 2026 07:51
@trop trop Bot mentioned this pull request Sep 21, 2026
4 tasks done
@MarshallOfSound MarshallOfSound added backport This is a backport PR semver/none 42-x-y labels Sep 21, 2026 — with Claude
@socket-security

socket-security Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​electron/​lint-roller@​3.2.0 ⏵ 4.0.093 +910092 +690 +9100
Updatednpm/​oxlint@​1.61.0 ⏵ 1.80.099 +110091 +196100

View full report

@socket-security

socket-security Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

View full report

@MarshallOfSound

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore npm/@electron/[email protected]

@MarshallOfSound
MarshallOfSound merged commit 735f416 into 42-x-y Sep 21, 2026
87 checks passed
@MarshallOfSound
MarshallOfSound deleted the claude/lint-roller-4-42-x-y branch September 21, 2026 16:35
@release-clerk

release-clerk Bot commented Sep 21, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants