mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -05:00
Update eslint and fix new script/lint errors
This commit is contained in:
@@ -163,8 +163,6 @@
|
||||
"test": "node script/test"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [],
|
||||
"parser": "babel-eslint",
|
||||
"globals": [
|
||||
"atom",
|
||||
"afterEach",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user