Skip to content

chore: lint bundled templates with oxlint and prettier instead of standard - #2015

Merged
MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-ky0l5c
Sep 18, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-ky0l5c

Conversation

@claude

@claude claude Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Human: @MarshallOfSound

Requested by Sam · project thread

Before: after #2010 the app source is linted by oxlint, but the bundled templates under static/ were still linted (and styled) by standard via lint:templates, keeping standard as a direct devDependency.

After: standard and lint:templates are gone. static/ is no longer ignored in .oxlintrc.json, so the existing lint:js (oxlint) run covers the templates, and the prettier format / format:write scripts now include static/**/*.js with an override (semi: false, trailingComma: "none") so the templates stay semicolon-free like they were under standard.

Follows up on #2010 to finish removing standard from this repo.

How:

  • package.json: drop standard, lint:templates and its lint-staged entry (the existing ./**/*.{js,ts,tsx} lint-staged glob already runs oxlint + prettier on the templates); extend format/format:write to static/**/*.js.
  • .prettierrc.js: add the static/**/*.js override.
  • .oxlintrc.json: remove /static from ignorePatterns.
  • Prettier rewraps a few long lines and normalises function ()function() in 14 template files; the single oxlint finding (unused e parameter in the desktopCapturer preload example) is fixed.
  • Note: standard (and through it eslint 8) is still in yarn.lock transitively via @electron/lint-roller@3; that goes away once feat!: replace lint-roller-markdown-standard with oxlint and oxfmt commands lint-roller#201 ships and lint-roller is bumped here.

Verified locally: yarn lint, yarn format and yarn test (903 tests) all pass.


Generated by Claude Code

…ndard

The templates under static/ were the last thing in this repo linted by
standard. Drop the standard devDependency and the lint:templates script,
stop ignoring static/ in .oxlintrc.json so the existing `lint:js` run
covers it, and extend the prettier `format` scripts to static/**/*.js with
an override that keeps the templates semicolon-free.

Prettier rewraps a handful of long lines and normalises function spacing
in 14 template files; the one oxlint finding (an unused callback
parameter in the desktopCapturer example) is fixed. standard stays in the
lockfile transitively via @electron/lint-roller until that package drops
it.
@claude
claude Bot requested review from a team and codebytere as code owners September 18, 2026 06:53
@claude
claude Bot requested a review from MarshallOfSound September 18, 2026 06:53
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 18, 2026 06:55
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 87.352%. remained the same — claude/project-thread-ky0l5c into main

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, straightforward config change. Verified: .oxlintrc.json now covers /static, .prettierrc.js adds a semicolon-free/no-trailing-comma override for static/**/*.js, package.json/yarn.lock drop standard and lint:templates cleanly (the existing ./**/*.{js,ts,tsx} lint-staged glob already covers the templates), and the reformatted static/** files are mechanical Prettier rewrites with no functional changes — including the one real fix, removing the unused e param in static/show-me/desktopcapturer/preload.js.

Extended reasoning...

Overview

This PR migrates linting/formatting of bundled static/**/*.js demo templates from standard to oxlint + Prettier. It touches package.json, yarn.lock, .oxlintrc.json, .prettierrc.js, and 14 template files under static/electron-quick-start/ and static/show-me/*.

Security risks

None. This is a tooling/config change affecting bundled example templates that ship as static reference code, not application logic. No new dependencies with elevated privilege, no auth/crypto/permission paths touched.

Level of scrutiny

Low-to-medium is appropriate: config/lint migrations are typically mechanical, but I verified the actual diffs of the config files and several template files rather than trusting the PR description alone, since reformatting diffs can hide accidental logic changes.

Other factors

I confirmed: (1) .oxlintrc.json removes /static from ignorePatterns as claimed; (2) .prettierrc.js adds the override with semi: false, trailingComma: 'none' scoped to static/**/*.js; (3) package.json/yarn.lock cleanly remove standard and lint:templates/its lint-staged entry, and the remaining ./**/*.{js,ts,tsx} lint-staged glob already matches static files so coverage is preserved; (4) spot-checked several reformatted files (desktopcapturer/preload.js, cookies/main.js, screen/preload.js, shell/preload.js) and all changes are purely Prettier-style reformatting (removed space before function parens, wrapped promise chains, single-line contextBridge calls) with one genuine fix — removal of an unused e parameter in an arrow function — matching the PR's described "oxlint finding" fix. No leftover references to standard or lint:templates remain in the repo config. No CLAUDE.md conventions apply. No CODEOWNERS were found in this checkout. Given the mechanical, well-verified nature of the change, this warrants approval.

@erickzhao erickzhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@MarshallOfSound
MarshallOfSound merged commit 74a3128 into main Sep 18, 2026
19 checks passed
@MarshallOfSound
MarshallOfSound deleted the claude/project-thread-ky0l5c branch September 18, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants