From dcfd92bf3874bb28048105c8bb80b0c63d74ed69 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 15 Mar 2022 15:15:36 -0400 Subject: [PATCH] remove unused vars --- src/Logger.spec.ts | 9 --------- src/device.spec.ts | 6 ++---- tsconfig.json | 6 +++++- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Logger.spec.ts b/src/Logger.spec.ts index 29e1afa..e34a7ee 100644 --- a/src/Logger.spec.ts +++ b/src/Logger.spec.ts @@ -1,20 +1,11 @@ import { expect } from 'chai'; import { Logger, LogLevel, noop } from './Logger'; -import * as moment from 'moment'; import chalk from 'chalk'; import { createSandbox } from 'sinon'; const sinon = createSandbox(); describe('Logger', () => { let logger: Logger; - const levels = [ - 'error', - 'warn', - 'log', - 'info', - 'debug', - 'trace' - ]; beforeEach(() => { logger = new Logger(LogLevel.trace); diff --git a/src/device.spec.ts b/src/device.spec.ts index ea47aa9..cb6459c 100644 --- a/src/device.spec.ts +++ b/src/device.spec.ts @@ -1,6 +1,5 @@ import * as assert from 'assert'; import * as fsExtra from 'fs-extra'; -import * as path from 'path'; import * as rokuDeploy from './index'; import { cwd, expectPathExists, expectThrowsAsync, outDir, rootDir, tempDir, writeFiles } from './testUtils.spec'; import * as dedent from 'dedent'; @@ -8,7 +7,6 @@ import * as dedent from 'dedent'; //these tests are run against an actual roku device. These cannot be enabled when run on the CI server describe('device', function device() { let options: rokuDeploy.RokuDeployOptions; - let originalCwd = process.cwd(); beforeEach(() => { fsExtra.emptyDirSync(tempDir); @@ -42,11 +40,11 @@ describe('device', function device() { port = CreateObject("roMessagePort") screen.SetMessagePort(port) screen.Show() - + while(true) msg = wait(0, port) end while - + if screen <> invalid then screen.Close() screen = invalid diff --git a/tsconfig.json b/tsconfig.json index 7f33be3..381ba26 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "outDir": "dist", "declaration": true, "strict": true, + "noUnusedLocals": true, "strictNullChecks": false, "lib": [ "es2015" @@ -20,5 +21,8 @@ "include": [ "src/**/*.ts", "device.spec.ts" - ] + ], + "ts-node": { + "transpileOnly": true + } } \ No newline at end of file