Skip to content

Commit

Permalink
fix: linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Apr 25, 2018
1 parent 05e3c73 commit e839e8e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/commands/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class EnvironmentOption extends StringParameter {
}

export type Parameters = { [key: string]: Parameter<any> }
export type ParameterValues<T extends Parameters> = {[P in keyof T]: T["_valueType"]}
export type ParameterValues<T extends Parameters> = { [P in keyof T]: T["_valueType"] }

export abstract class Command<T extends Parameters = {}, U extends Parameters = {}> {
abstract name: string
Expand Down
2 changes: 1 addition & 1 deletion src/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { FancyConsoleWriter, Writer, BasicConsoleWriter } from "./writers"
import { ParameterError } from "../exceptions"

const ROOT_DEPTH = -1
const DEFAULT_CONFIGS: {[key in LoggerType]: LoggerConfig} = {
const DEFAULT_CONFIGS: { [key in LoggerType]: LoggerConfig } = {
[LoggerType.fancy]: {
level: LogLevel.info,
writers: [new FancyConsoleWriter()],
Expand Down
2 changes: 1 addition & 1 deletion src/logger/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface Node {
children: any[]
}

export type LogOptsResolvers = {[K in keyof LogEntryOpts]?: Function}
export type LogOptsResolvers = { [K in keyof LogEntryOpts]?: Function }

// TODO Tail call optimization?
export function getNodeListFromTree<T extends Node>(node: T): T[] {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/kubernetes/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TreeVersion } from "../../vcs/base"
import {
ContainerModule,
} from "../container"
import { values, every, map, extend } from "lodash"
import { values, every } from "lodash"
import { deserializeKeys, serializeKeys, splitFirst } from "../../util"
import { ServiceStatus } from "../../types/service"
import {
Expand Down Expand Up @@ -174,8 +174,8 @@ export async function testModule(
// TODO: include a service context here
const context = provider.config.context
const baseEnv = {}
const envVars: {} = extend({}, baseEnv, testSpec.variables)
const envArgs = map(envVars, (v: string, k: string) => `--env=${k}=${v}`)
const envVars = { ...baseEnv, ...testSpec.variables }
const envArgs = Object.entries(envVars).map(([v, k]) => `--env=${k}=${v}`)

// TODO: use the runModule() method
const testCommandStr = testSpec.command.join(" ")
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/kubernetes/kubectl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export class Kubectl {
let _timeout

const _reject = (msg: string) => {
const details = extend({ args, preparedArgs, msg, data: data.toString() }, <any>out)
const dataStr = data ? data.toString() : null
const details = extend({ args, preparedArgs, msg, data: dataStr }, <any>out)
const err = new RuntimeError(`Failed running 'kubectl ${args.join(" ")}'`, details)
reject(err)
}
Expand Down
4 changes: 2 additions & 2 deletions src/types/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ interface PluginActionDescription {
description?: string
}

const pluginActionDescriptions: {[P in PluginActionName]: PluginActionDescription } = {
const pluginActionDescriptions: { [P in PluginActionName]: PluginActionDescription } = {
getEnvironmentStatus: {},
configureEnvironment: {},
destroyEnvironment: {},
Expand All @@ -250,7 +250,7 @@ const pluginActionDescriptions: {[P in PluginActionName]: PluginActionDescriptio
deleteConfig: {},
}

const moduleActionDescriptions: {[P in ModuleActionName]: PluginActionDescription } = {
const moduleActionDescriptions: { [P in ModuleActionName]: PluginActionDescription } = {
parseModule: {},
getModuleBuildStatus: {},
buildModule: {},
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type HookCallback = (callback?: () => void) => void

const exitHooks: HookCallback[] = []

export type Nullable<T> = {[P in keyof T]: T[P] | null }
export type Nullable<T> = { [P in keyof T]: T[P] | null }

export function shutdown(code) {
if (exitHooks.length > 1) {
Expand Down

0 comments on commit e839e8e

Please sign in to comment.