chore: lint bundled templates with oxlint and prettier instead of standard - #2015
Conversation
…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.
There was a problem hiding this comment.
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.
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) bystandardvialint:templates, keepingstandardas a direct devDependency.After:
standardandlint:templatesare gone.static/is no longer ignored in.oxlintrc.json, so the existinglint:js(oxlint) run covers the templates, and the prettierformat/format:writescripts now includestatic/**/*.jswith 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: dropstandard,lint:templatesand its lint-staged entry (the existing./**/*.{js,ts,tsx}lint-staged glob already runs oxlint + prettier on the templates); extendformat/format:writetostatic/**/*.js..prettierrc.js: add thestatic/**/*.jsoverride..oxlintrc.json: remove/staticfromignorePatterns.function ()→function()in 14 template files; the single oxlint finding (unusedeparameter in the desktopCapturer preload example) is fixed.standard(and through it eslint 8) is still inyarn.locktransitively 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 formatandyarn test(903 tests) all pass.Generated by Claude Code