mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
chore: lint code blocks in docs with ESLint (#42113)
This commit is contained in:
@@ -35,15 +35,16 @@ Using the [React Developer Tools][react-devtools] as an example:
|
||||
|
||||
```js
|
||||
const { app, session } = require('electron')
|
||||
const path = require('node:path')
|
||||
|
||||
const os = require('node:os')
|
||||
|
||||
const path = require('node:path')
|
||||
|
||||
// on macOS
|
||||
const reactDevToolsPath = path.join(
|
||||
os.homedir(),
|
||||
'/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.9.0_0'
|
||||
)
|
||||
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
await session.defaultSession.loadExtension(reactDevToolsPath)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user