chore: have 'use strict' consistently across our lib files (#14721)
This commit is contained in:
parent
0a621bfea1
commit
176a76217c
57 changed files with 120 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
module.exports = require('@electron/internal/browser/api/auto-updater/auto-updater-win')
|
||||
} else {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
const { autoUpdater, AutoUpdater } = process.atomBinding('auto_updater')
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const spawn = require('child_process').spawn
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = process.atomBinding('content_tracing')
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const common = require('@electron/internal/common/api/exports/electron')
|
||||
// since browser module list is also used in renderer, keep it separate.
|
||||
const moduleList = require('@electron/internal/browser/api/module-list')
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = process.atomBinding('global_shortcut').globalShortcut
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
|
||||
const emitter = new EventEmitter()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { app } = require('electron')
|
||||
|
||||
const roles = {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
function splitArray (arr, predicate) {
|
||||
const result = arr.reduce((multi, item) => {
|
||||
const current = multi[multi.length - 1]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const features = process.atomBinding('features')
|
||||
|
||||
// Browser side modules, please sort alphabetically.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { Notification, isSupported } = process.atomBinding('notification')
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { powerMonitor, PowerMonitor } = process.atomBinding('power_monitor')
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = process.atomBinding('power_save_blocker').powerSaveBlocker
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { app, session } = require('electron')
|
||||
|
||||
// Global protocol APIs.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { screen, Screen } = process.atomBinding('screen')
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { app } = require('electron')
|
||||
const { fromPartition, Session, Cookies } = process.atomBinding('session')
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { systemPreferences, SystemPreferences } = process.atomBinding('system_preferences')
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
|
||||
let nextItemID = 1
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const { EventEmitter } = require('events')
|
||||
const { Tray } = process.atomBinding('tray')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue