From ca628e99d97584e400759779c00637217e889a85 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 14 Dec 2020 09:50:00 -0600 Subject: [PATCH] eslinting --- src/commands/content-type/compare-remote.ts | 6 +++--- src/commands/content-type/compare.ts | 14 +++++++------- tests/audit.test.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/commands/content-type/compare-remote.ts b/src/commands/content-type/compare-remote.ts index 4a8f119..6bd39a0 100644 --- a/src/commands/content-type/compare-remote.ts +++ b/src/commands/content-type/compare-remote.ts @@ -29,16 +29,16 @@ export default class CompareRemoteCommand extends Command { char: 'c', description: 'Content Type UID', required: true, - }) + }), } async run() { try { const {flags} = this.parse(CompareRemoteCommand) - this.setup({ 'token-alias': undefined, 'stack': flags['origin-stack'] }) + this.setup({'token-alias': undefined, stack: flags['origin-stack']}) cli.action.start(Command.RequestDataMessage) - + const originStackApi = flags['origin-stack'] as string const remoteStackApi = flags['remote-stack'] as string diff --git a/src/commands/content-type/compare.ts b/src/commands/content-type/compare.ts index 1546cd5..be0a2a7 100644 --- a/src/commands/content-type/compare.ts +++ b/src/commands/content-type/compare.ts @@ -38,14 +38,14 @@ export default class CompareCommand extends Command { char: 'l', description: 'Content Type version, i.e. prev version', required: false, - dependsOn: ['right'] + dependsOn: ['right'], }), right: flags.integer({ char: 'r', description: 'Content Type version, i.e. later version', required: false, - dependsOn: ['left'] + dependsOn: ['left'], }), } @@ -55,13 +55,13 @@ export default class CompareCommand extends Command { this.setup(flags) cli.action.start(Command.RequestDataMessage) - + if (!flags.left) { - const discovery = await this.client.getContentType(this.apiKey, flags['content-type'], false); - const version = discovery.content_type._version; + const discovery = await this.client.getContentType(this.apiKey, flags['content-type'], false) + const version = discovery.content_type._version - flags.left = version; - flags.right = version > 1 ? version - 1 : version; + flags.left = version + flags.right = version > 1 ? version - 1 : version this.log(`Comparing versions: ${flags.left} <-> ${flags.right}.`) } diff --git a/tests/audit.test.ts b/tests/audit.test.ts index 7c0c6b3..b73b31c 100644 --- a/tests/audit.test.ts +++ b/tests/audit.test.ts @@ -2,4 +2,4 @@ describe('audit command', () => { test('result', () => { expect(true).toBe(true) }) -}) \ No newline at end of file +})