electron/docs
Charles Kerr 673351b6a1
chore: use oxfmt and oxlint in 42-x-y (#51435)
* build: replace eslint with oxlint and add oxfmt

Replace ESLint and its plugin ecosystem with oxlint (oxc.rs).
Add oxfmt alongside oxlint for JS/TS formatting and import sorting.

- Consolidate root .eslintrc.json plus 13 nested configs into .oxlintrc.json
- script/lint.js spawns oxlint binary directly instead of ESLint Node API
- Per-process no-restricted-imports rules preserved as oxlintrc overrides
- mocha/no-exclusive-tests replaced by in-repo plugin (no-only-tests.mjs)
- docs ESLint pass replaced by inline node: protocol check in lint.js
- .oxfmtrc.json matching repo style (single quotes, semicolons, 2-space)
- yarn lint:fmt (oxfmt --check) chained into yarn lint
- yarn format (oxfmt --write) for local fixup
- lint-staged runs oxfmt --write on staged JS/TS files

This commit contains only rule/tooling infrastructure changes and is
intended to be cherry-picked to other maintenance branches, where
formatting and lint fixes can be applied separately.

Manual backport of electron/electron@e1af67c698 (#50691) and
electron/electron@3c7fd34f47 (#50692).

* chore: apply oxfmt formatting and oxlint fixes

One-time application of the new linting and formatting rules to the
42-x-y codebase:

- yarn format (oxfmt --write) over all JS/TS sources
- oxlint --fix to restore curly braces where oxfmt removed them
- Prefix unused parameters with _ (no-unused-vars)
- Add eslint-disable-next-line comments for intentional patterns:
  - prefer-promise-reject-errors in desktop-capturer.ts
  - no-throw-literal in preload.ts

Pure formatting and lint suppression; no behavioral changes.
2026-05-02 15:23:13 -07:00
..
api feat: support WebAuthn Touch ID platform authenticator on macOS (#51411) 2026-05-01 11:15:13 -04:00
development chore: use oxfmt and oxlint in 42-x-y (#51435) 2026-05-02 15:23:13 -07:00
fiddles docs: add Menu module tutorials (#47268) 2025-07-15 15:09:32 -07:00
images feat: support heap profiling in contentTracing (#51162) 2026-04-29 11:29:42 -07:00
tutorial docs: fix @electron/osx-sign package name (#51309) 2026-04-24 07:50:12 +02:00
api-history.schema.json docs: api history (#42982) 2024-08-19 11:17:10 -07:00
breaking-changes.md docs: fix version of deprecation notice (#51423) 2026-04-30 18:31:40 -05:00
CLAUDE.md docs: add API history (G-I) (#50194) 2026-03-12 14:43:39 +01:00
experimental.md docs: fix apostrophe typo "Electrons" -> "Electron's" (#44516) 2024-11-02 15:52:22 -05:00
faq.md docs: clarify postinstall requirements (#48485) 2025-10-09 09:48:47 +02:00
glossary.md docs: fix typos across documentation (#49734) 2026-02-11 12:45:46 +01:00
README.md docs: add documentation for ImageView (#46760) 2025-05-29 10:24:16 -07:00
why-electron.md docs: fix typos across documentation (#49734) 2026-02-11 12:45:46 +01:00

Official Guides

Please make sure that you use the documents that match your Electron version. The version number should be a part of the page URL. If it's not, you are probably using the documentation of a development branch which may contain API changes that are not compatible with your Electron version. To view older versions of the documentation, you can browse by tag on GitHub by opening the "Switch branches/tags" dropdown and selecting the tag that matches your version.

FAQ

There are questions that are asked quite often. Check this out before creating an issue:

Guides and Tutorials

Getting started

Learning the basics

Advanced steps

Detailed Tutorials

These individual tutorials expand on topics discussed in the guide above.


API References

Custom Web Features:

Modules for the Main Process:

Modules for the Renderer Process (Web Page):

Modules for Both Processes:

Development

See development/README.md