From 9dc9a8f775c93136d6dabf071f7402d58bc08225 Mon Sep 17 00:00:00 2001 From: Ryan Block Date: Mon, 29 Apr 2024 10:58:25 -0700 Subject: [PATCH] Lint --- check-creds/index.js | 1 - fingerprint/index.js | 2 +- test/fingerprint/index-test.js | 4 ++-- updater/lib.js | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/check-creds/index.js b/check-creds/index.js index 126b435..f06e7af 100644 --- a/check-creds/index.js +++ b/check-creds/index.js @@ -5,7 +5,6 @@ * - Thus, sometimes it's ok to use dummy creds, but sometimes we need to halt (via this util) */ module.exports = function checkAwsCredentials (params, callback) { - // eslint-disable-next-line let awsLite = require('@aws-lite/client') let { inventory } = params diff --git a/fingerprint/index.js b/fingerprint/index.js index ef7a74b..e172244 100644 --- a/fingerprint/index.js +++ b/fingerprint/index.js @@ -43,7 +43,7 @@ module.exports = function fingerprint (params, callback) { try { fs.rmSync(staticJson, { force: true }) } - catch (err) { + catch { let msg = `Error removing ${filename} file, please remove it manually or static asset calls may be broken` update.warn(msg) } diff --git a/test/fingerprint/index-test.js b/test/fingerprint/index-test.js index 22ffd09..f67e7e3 100644 --- a/test/fingerprint/index-test.js +++ b/test/fingerprint/index-test.js @@ -12,7 +12,7 @@ let globStub = sinon.stub().callsFake(() => []) let glob = { globSync: globStub } let shaStub = sinon.stub(sha, 'get').callsFake((file, callback) => callback(null, 'df330f3f12')) // Fake hash let fingerprint = proxyquire('../../fingerprint', { - 'glob': glob + 'glob': glob, }) let params = () => ({ @@ -165,7 +165,7 @@ test('fingerprint does does not generate static.json when set to external', t => // Globbing globStub.resetBehavior() globStub.callsFake(() => [ - pathToUnix(join(process.cwd(), 'public', 'index.html')) + pathToUnix(join(process.cwd(), 'public', 'index.html')), ]) // Static manifest let fsStub = sinon.stub(fs, 'writeFile').callsFake((dest, data, callback) => { diff --git a/updater/lib.js b/updater/lib.js index 6623f1e..23bb3a7 100644 --- a/updater/lib.js +++ b/updater/lib.js @@ -14,7 +14,7 @@ let printer = { }, // Write to console, add single extra line to buffer while running restoreCursor: () => restore(), - write: t => out.write(t + '\033[1A' + '\n') + write: t => out.write(t + '\033[1A' + '\n'), } printer.hideCursor = () => printer.write('\u001B[?25l') @@ -31,5 +31,5 @@ let spinner = { frames, timing } module.exports = { printer, - spinner + spinner, }