chore: lint code blocks in docs with ESLint (#42113)

This commit is contained in:
David Sanders
2025-05-29 12:45:26 -07:00
committed by GitHub
parent 4e61f5b26f
commit 0d70389ccb
51 changed files with 308 additions and 34 deletions

View File

@@ -294,6 +294,7 @@ e.g. `APPCOMMAND_BROWSER_BACKWARD` is emitted as `browser-backward`.
```js
const { BaseWindow } = require('electron')
const win = new BaseWindow()
win.on('app-command', (e, cmd) => {
// Navigate the window back when the user hits their mouse back button
@@ -502,6 +503,7 @@ A `boolean` property that determines whether the window is excluded from the app
```js @ts-expect-error=[12]
const { Menu, BaseWindow } = require('electron')
const win = new BaseWindow({ height: 600, width: 600 })
const template = [
@@ -727,6 +729,7 @@ Resizes and moves the window to the supplied bounds. Any properties that are not
```js
const { BaseWindow } = require('electron')
const win = new BaseWindow()
// set all bounds properties
@@ -987,6 +990,7 @@ a HTML-rendered toolbar. For example:
```js
const { BaseWindow } = require('electron')
const win = new BaseWindow()
const toolbarRect = document.getElementById('toolbar').getBoundingClientRect()