From c54b330d68e718d695b697efd97f5c07be85334e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 14 Oct 2016 13:54:10 +0200 Subject: [PATCH] Update eslint and fix new `script/lint` errors --- package.json | 2 -- script/package.json | 3 +-- src/initialize-benchmark-window.js | 16 +++++++++------ src/main-process/parse-command-line.js | 27 ++++++++++++++++++++++---- src/native-compile-cache.js | 2 +- 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 6b1357157..6361f561c 100644 --- a/package.json +++ b/package.json @@ -163,8 +163,6 @@ "test": "node script/test" }, "standard": { - "ignore": [], - "parser": "babel-eslint", "globals": [ "atom", "afterEach", diff --git a/script/package.json b/script/package.json index 0ddc54928..1f4cf782f 100644 --- a/script/package.json +++ b/script/package.json @@ -4,7 +4,6 @@ "dependencies": { "async": "2.0.1", "babel-core": "5.8.38", - "babel-eslint": "6.1.2", "coffeelint": "1.15.7", "colors": "1.1.2", "csslint": "1.0.2", @@ -24,7 +23,7 @@ "runas": "3.1.1", "season": "5.3.0", "semver": "5.3.0", - "standard": "6.0.0", + "standard": "8.4.0", "sync-request": "3.0.1", "tello": "1.0.5", "webdriverio": "2.4.5", diff --git a/src/initialize-benchmark-window.js b/src/initialize-benchmark-window.js index 55bda75fa..e4be4420b 100644 --- a/src/initialize-benchmark-window.js +++ b/src/initialize-benchmark-window.js @@ -1,6 +1,6 @@ /** @babel */ -import {ipcRenderer, remote} from 'electron' +import {remote} from 'electron' import path from 'path' import ipcHelpers from './ipc-helpers' import util from 'util' @@ -56,8 +56,12 @@ export default async function () { const applicationDelegate = new ApplicationDelegate() global.atom = new AtomEnvironment({ - applicationDelegate, window, document, clipboard, - configDirPath: process.env.ATOM_HOME, enablePersistence: false + applicationDelegate, + window, + document, + clipboard, + configDirPath: process.env.ATOM_HOME, + enablePersistence: false }) // Prevent benchmarks from modifying application menus @@ -71,15 +75,15 @@ export default async function () { console.log = function (...args) { const formatted = util.format(...args) - process.stdout.write(formatted + "\n") + process.stdout.write(formatted + '\n') } console.warn = function (...args) { const formatted = util.format(...args) - process.stderr.write(formatted + "\n") + process.stderr.write(formatted + '\n') } console.error = function (...args) { const formatted = util.format(...args) - process.stderr.write(formatted + "\n") + process.stderr.write(formatted + '\n') } } else { remote.getCurrentWindow().show() diff --git a/src/main-process/parse-command-line.js b/src/main-process/parse-command-line.js index 2f10ae3bb..68a18fa30 100644 --- a/src/main-process/parse-command-line.js +++ b/src/main-process/parse-command-line.js @@ -136,10 +136,29 @@ module.exports = function parseCommandLine (processArgs) { devResourcePath = normalizeDriveLetterName(devResourcePath) return { - resourcePath, devResourcePath, pathsToOpen, urlsToOpen, executedFrom, test, - version, pidToKillWhenClosed, devMode, safeMode, newWindow, logFile, socketPath, - userDataDir, profileStartup, timeout, setPortable, clearWindowState, - addToLastWindow, mainProcess, benchmark, benchmarkTest, env: process.env + resourcePath, + devResourcePath, + pathsToOpen, + urlsToOpen, + executedFrom, + test, + version, + pidToKillWhenClosed, + devMode, + safeMode, + newWindow, + logFile, + socketPath, + userDataDir, + profileStartup, + timeout, + setPortable, + clearWindowState, + addToLastWindow, + mainProcess, + benchmark, + benchmarkTest, + env: process.env } } diff --git a/src/native-compile-cache.js b/src/native-compile-cache.js index 50fa71fc3..a9857fc0c 100644 --- a/src/native-compile-cache.js +++ b/src/native-compile-cache.js @@ -45,7 +45,7 @@ class NativeCompileCache { Module.prototype._compile = function (content, filename) { let moduleSelf = this // remove shebang - content = content.replace(/^\#\!.*/, '') + content = content.replace(/^#!.*/, '') function require (path) { return moduleSelf.require(path) }