From f81bfb7b86589d7f199a44013c0279077adc2d49 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Thu, 23 Nov 2017 13:42:48 -0800 Subject: [PATCH] :wrench: Fix style issues --- default_app/main.js | 1 - lib/browser/api/auto-updater/squirrel-update-win.js | 6 +++--- lib/browser/api/net.js | 3 --- lib/browser/api/web-contents.js | 1 + 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/default_app/main.js b/default_app/main.js index ce77a15362d3..7fdfc7c3fa36 100644 --- a/default_app/main.js +++ b/default_app/main.js @@ -306,7 +306,6 @@ function startRepl () { if (process.platform === 'win32') { console.error('Electron REPL not currently supported on Windows') process.exit(1) - return } const repl = require('repl') diff --git a/lib/browser/api/auto-updater/squirrel-update-win.js b/lib/browser/api/auto-updater/squirrel-update-win.js index 60345f1a1abe..d82577bcf483 100644 --- a/lib/browser/api/auto-updater/squirrel-update-win.js +++ b/lib/browser/api/auto-updater/squirrel-update-win.js @@ -28,7 +28,7 @@ var spawnUpdate = function (args, detached, callback) { // Process spawned, different args: Return with error // No process spawned: Spawn new process if (spawnedProcess && !isSameArgs(args)) { - return callback('AutoUpdater process with arguments ' + args + ' is already running') + return callback(`AutoUpdater process with arguments ${args} is already running`) } else if (!spawnedProcess) { spawnedProcess = spawn(updateExe, args, { detached: detached @@ -68,7 +68,7 @@ var spawnUpdate = function (args, detached, callback) { // Process terminated with error. if (code !== 0) { - return callback('Command failed: ' + (signal != null ? signal : code) + '\n' + stderr) + return callback(`Command failed: ${signal != null ? signal : code}\n${stderr}`) } // Success. @@ -93,7 +93,7 @@ exports.checkForUpdate = function (updateURL, callback) { json = stdout.trim().split('\n').pop() update = (ref = JSON.parse(json)) != null ? (ref1 = ref.releasesToApply) != null ? typeof ref1.pop === 'function' ? ref1.pop() : void 0 : void 0 : void 0 } catch (jsonError) { - return callback('Invalid result:\n' + stdout) + return callback(`Invalid result:\n${stdout}`) } return callback(null, update) }) diff --git a/lib/browser/api/net.js b/lib/browser/api/net.js index d588e238d43a..54ef99d407ff 100644 --- a/lib/browser/api/net.js +++ b/lib/browser/api/net.js @@ -79,7 +79,6 @@ class IncomingMessage extends Readable { this.shouldPush = true this._pushInternalData() } - } URLRequest.prototype._emitRequestEvent = function (isAsync, ...rest) { @@ -103,7 +102,6 @@ URLRequest.prototype._emitResponseEvent = function (isAsync, ...rest) { } class ClientRequest extends EventEmitter { - constructor (options, callback) { super() @@ -354,7 +352,6 @@ class ClientRequest extends EventEmitter { abort () { this.urlRequest.cancel() } - } function writeAfterEndNT (self, error, callback) { diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index 61b37f773317..f770dbb31b3c 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.js @@ -6,6 +6,7 @@ const {app, ipcMain, session, NavigationController} = electron // session is not used here, the purpose is to make sure session is initalized // before the webContents module. +// eslint-disable-next-line session let nextId = 0