Repository navigation
docs: use json5 for bare object literal code blocks - #54122
Merged
MarshallOfSound merged 3 commits intoSep 19, 2026
Merged
MarshallOfSound merged 3 commits into
MarshallOfSound merged 3 commits into
Conversation
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
Co-authored-by: Claude <[email protected]>
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 Co-authored-by: Claude <[email protected]>
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]>
4 tasks done
MarshallOfSound
approved these changes
Sep 19, 2026
MarshallOfSound
deleted the
trop/45-x-y-bp-docs-use-json5-for-bare-object-literal-code-blocks-1789859098319
branch
September 19, 2026 23:17
|
No Release Notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #54107
See that PR for details.
Notes: none