From 6c770b363f72c6717aa322e1fbdd6b221a6c3e8f Mon Sep 17 00:00:00 2001 From: Niels ten Boom Date: Tue, 21 Nov 2023 14:13:17 +0100 Subject: [PATCH] earlier linting --- .github/workflows/build.yaml | 8 ++++---- packages/hooklib/src/utils.ts | 2 ++ packages/k8s/src/hooks/prepare-job.ts | 2 +- packages/k8s/src/k8s/index.ts | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dded6977..1ba704d7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,14 +18,14 @@ jobs: config: packages/k8s/tests/test-kind.yaml - run: npm install name: Install dependencies - - run: npm run bootstrap - name: Bootstrap the packages - - run: npm run build-all - name: Build packages - run: npm run format-check - name: Check linter run: | npm run lint git diff --exit-code -- ':!packages/k8s/tests/test-kind.yaml' + - run: npm run bootstrap + name: Bootstrap the packages + - run: npm run build-all + name: Build packages - name: Run tests run: npm run test \ No newline at end of file diff --git a/packages/hooklib/src/utils.ts b/packages/hooklib/src/utils.ts index 12b9c7cd..97df6af6 100644 --- a/packages/hooklib/src/utils.ts +++ b/packages/hooklib/src/utils.ts @@ -19,6 +19,7 @@ export async function getInputFromStdin(): Promise { return inputJson as HookData } +//@ts-ignore export function writeToResponseFile(filePath: string, message: any): void { if (!filePath) { throw new Error(`Expected file path`) @@ -32,6 +33,7 @@ export function writeToResponseFile(filePath: string, message: any): void { }) } +//@ts-ignore function toCommandValue(input: any): string { if (input === null || input === undefined) { return '' diff --git a/packages/k8s/src/hooks/prepare-job.ts b/packages/k8s/src/hooks/prepare-job.ts index 0964165f..1a7c2cfd 100644 --- a/packages/k8s/src/hooks/prepare-job.ts +++ b/packages/k8s/src/hooks/prepare-job.ts @@ -18,7 +18,7 @@ import { PodPhase } from '../k8s/utils' import { JOB_CONTAINER_NAME } from './constants' -import { CoreV1EndpointPort, HttpError } from '@kubernetes/client-node' +import { HttpError } from '@kubernetes/client-node' export async function prepareJob( args: prepareJobArgs, diff --git a/packages/k8s/src/k8s/index.ts b/packages/k8s/src/k8s/index.ts index f7eefa7d..3a00d76a 100644 --- a/packages/k8s/src/k8s/index.ts +++ b/packages/k8s/src/k8s/index.ts @@ -127,6 +127,7 @@ export async function createPod( * * https://lodash.com/docs/4.17.15#mergeWith */ +//@ts-ignore function podSpecCustomizer(objValue, srcValue, key): any[] | undefined { if (['image', 'name', 'command', 'args'].includes(key)) { return objValue