Cleanup lints identified by eslint

Some files were omitted in the .eslintignore, left as an exercise to the
reader.

We probably want to reduce amount of globals overall and use proper es
modules.
This commit is contained in:
Arlo Breault 2019-07-07 15:40:51 +02:00
parent ebeb45c8d6
commit fab39ae57c
22 changed files with 93 additions and 56 deletions

View file

@ -1,7 +1,8 @@
#!/usr/bin/env node
var fs = require('fs');
var { exec, spawn, execSync } = require('child_process');
/* global require, process */
var { exec, spawn } = require('child_process');
// All files required.
var FILES = [
@ -15,12 +16,6 @@ var FILES = [
'shims.js'
];
var INITS = [
'init-badge.js',
'init-node.js',
'init-webext.js'
];
var FILES_SPEC = [
'spec/broker.spec.js',
'spec/init.spec.js',
@ -42,7 +37,7 @@ var copyStaticFiles = function() {
var concatJS = function(outDir, init) {
var files;
files = FILES.concat(`init-${init}.js`);
return exec(`cat ${files.join(' ')} > ${outDir}/${OUTFILE}`, function(err, stdout, stderr) {
return exec(`cat ${files.join(' ')} > ${outDir}/${OUTFILE}`, function(err) {
if (err) {
throw err;
}