diff --git a/lib/common/asar.js b/lib/common/asar.js index 262412813221..dbf567050251 100644 --- a/lib/common/asar.js +++ b/lib/common/asar.js @@ -1,3 +1,5 @@ +/* globals $, xit */ + (function () { const asar = process.binding('atom_common_asar') const child_process = require('child_process') diff --git a/lib/renderer/inspector.js b/lib/renderer/inspector.js index 61be586f7887..2b0fcbc80c1d 100644 --- a/lib/renderer/inspector.js +++ b/lib/renderer/inspector.js @@ -1,3 +1,5 @@ +/* globals InspectorFrontendHost, WebInspector, DevToolsAPI, DevToolsAPI, Blob */ + window.onload = function () { // Use menu API to show context menu. InspectorFrontendHost.showContextMenuAtPoint = createMenu diff --git a/package.json b/package.json index 855d5155504a..2d5c61f494fe 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ }, "standard": { "ignore": ["/vendor"], - "globals": ["afterEach", "beforeEach", "describe", "it", "location"] + "globals": ["$", "after", "afterEach", "before", + "beforeEach", "describe", "it", "location"] }, "private": true, "scripts": { diff --git a/spec/api-web-request-spec.js b/spec/api-web-request-spec.js index abc4f9568cd3..8ce4bca8db11 100644 --- a/spec/api-web-request-spec.js +++ b/spec/api-web-request-spec.js @@ -1,3 +1,5 @@ +/* globals $ */ + const assert = require('assert') const http = require('http') const qs = require('querystring') diff --git a/spec/fixtures/module/fork_ping.js b/spec/fixtures/module/fork_ping.js index 76bf1b0e3688..aa515333400a 100644 --- a/spec/fixtures/module/fork_ping.js +++ b/spec/fixtures/module/fork_ping.js @@ -1,8 +1,10 @@ +const path = require('path') + process.on('uncaughtException', function (error) { process.send(error.stack) }) -var child = require('child_process').fork(__dirname + '/ping.js') +var child = require('child_process').fork(path.join(__dirname, '/ping.js')) process.on('message', function (msg) { child.send(msg) }) diff --git a/spec/fixtures/module/function.js b/spec/fixtures/module/function.js index 526daf76fa8f..8a2bb6c421ec 100644 --- a/spec/fixtures/module/function.js +++ b/spec/fixtures/module/function.js @@ -1 +1 @@ -exports.aFunction = function () { return 1127; } +exports.aFunction = function () { return 1127 } diff --git a/spec/fixtures/module/locale-compare.js b/spec/fixtures/module/locale-compare.js index 3446e2f443dd..402754004434 100644 --- a/spec/fixtures/module/locale-compare.js +++ b/spec/fixtures/module/locale-compare.js @@ -2,6 +2,6 @@ process.on('message', function () { process.send([ 'a'.localeCompare('a'), 'ä'.localeCompare('z', 'de'), - 'ä'.localeCompare('a', 'sv', { sensitivity: 'base' }), + 'ä'.localeCompare('a', 'sv', { sensitivity: 'base' }) ]) }) diff --git a/spec/fixtures/pages/service-worker/service-worker.js b/spec/fixtures/pages/service-worker/service-worker.js index 7d80f45e2df4..be5ecefd5701 100644 --- a/spec/fixtures/pages/service-worker/service-worker.js +++ b/spec/fixtures/pages/service-worker/service-worker.js @@ -1,3 +1,5 @@ +/* globals self, URL, Response */ + self.addEventListener('fetch', function (event) { var requestUrl = new URL(event.request.url) diff --git a/spec/node-spec.js b/spec/node-spec.js index 286c4d6f9161..68b328b2ab9b 100644 --- a/spec/node-spec.js +++ b/spec/node-spec.js @@ -1,3 +1,5 @@ +/* globals xit */ + const assert = require('assert') const child_process = require('child_process') const fs = require('fs') diff --git a/spec/static/main.js b/spec/static/main.js index f1d2a5eafa63..d48285a51916 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -17,7 +17,7 @@ var argv = require('yargs') .argv var window = null -process.port = 0; // will be used by crash-reporter spec. +process.port = 0 // will be used by crash-reporter spec. app.commandLine.appendSwitch('js-flags', '--expose_gc') app.commandLine.appendSwitch('ignore-certificate-errors') @@ -48,7 +48,7 @@ ipcMain.on('process.exit', function (event, code) { }) ipcMain.on('eval', function (event, script) { - event.returnValue = eval(script) + event.returnValue = eval(script) // eslint-disable-line }) ipcMain.on('echo', function (event, msg) { @@ -84,10 +84,10 @@ app.on('ready', function () { height: 600, webPreferences: { javascript: true // Test whether web preferences crashes. - }, + } }) window.loadURL(url.format({ - pathname: __dirname + '/index.html', + pathname: path.join(__dirname, '/index.html'), protocol: 'file', query: { grep: argv.grep,