From 5ea99021b0885e2e4d671c09379605140eca0645 Mon Sep 17 00:00:00 2001 From: GermanVor Date: Thu, 3 Oct 2024 22:41:51 +0200 Subject: [PATCH] chore: lint --- package.json | 2 +- src/utils/operation/wait-for.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 81da88c6..df737e25 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "scripts": { "test": "jest -c config/jest.ts --passWithNoTests '.*\\.test\\.ts$'", - "lint": "eslint src config", + "lint": "eslint src/ --quiet --fix", "build": "tsc -p .", "generate-code": "ts-node scripts/generate-code.ts", "check-endpoints": "ts-node scripts/check-endpoints.ts", diff --git a/src/utils/operation/wait-for.ts b/src/utils/operation/wait-for.ts index 621b0b83..f929db9d 100644 --- a/src/utils/operation/wait-for.ts +++ b/src/utils/operation/wait-for.ts @@ -1,6 +1,6 @@ -import { cloudApi, serviceClients } from "../.."; -import { Operation } from "../../generated/yandex/cloud/operation/operation"; -import { Session } from "../../session"; +import { cloudApi, serviceClients } from '../..'; +import { Operation } from '../../generated/yandex/cloud/operation/operation'; +import { Session } from '../../session'; const { operation: { @@ -14,11 +14,11 @@ export const waitForOperation = ( op: Operation, session: Session, timeoutMs: number = DEFAULT_TIMEOUT_MS, - operationServiceEndpoint?: string + operationServiceEndpoint?: string, ): Promise => { const client = session.client( serviceClients.OperationServiceClient, - operationServiceEndpoint + operationServiceEndpoint, ); const maxChecksCount = Math.ceil(timeoutMs / session.pollInterval); @@ -33,7 +33,7 @@ export const waitForOperation = ( { retry: true, retryMaxAttempts: 3, - } + }, ); checksCount++; @@ -43,7 +43,7 @@ export const waitForOperation = ( } else if (operation.done) { resolve(operation); } else if (checksCount > maxChecksCount) { - reject(new Error("Timeout reached")); + reject(new Error('Timeout reached')); } else { setTimeout(checkOperation, session.pollInterval); }