feat: fixed eslint and resolved all eslint issues

This commit is contained in:
Akhil Mohan
2024-01-30 22:30:42 +05:30
parent 7c4dd5000f
commit 5855cc660a
147 changed files with 1165 additions and 938 deletions
@@ -1,3 +1,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-param-reassign */
import axios from "axios";
import jmespath from "jmespath";
@@ -37,7 +42,7 @@ export const interpolate = (data: any, getValue: (key: string) => unknown) => {
if ((data as { ref: string })?.ref) return getValue((data as { ref: string }).ref);
const temp = data as Record<string, unknown>; // for converting ts object to record type
Object.keys(temp).forEach((key) => {
temp[key as keyof typeof temp] = interpolate(data[key as keyof typeof temp], getValue);
temp[key] = interpolate(data[key], getValue);
});
}
return data;
@@ -6,6 +6,7 @@ import {
infisicalSymmetricEncypt
} from "@app/lib/crypto/encryption";
import { daysToMillisecond, secondsToMillis } from "@app/lib/dates";
import { BadRequestError } from "@app/lib/errors";
import { logger } from "@app/lib/logger";
import { alphaNumericNanoId } from "@app/lib/nanoid";
import { QueueJobs, QueueName, TQueueServiceFactory } from "@app/queue";
@@ -34,7 +35,6 @@ import {
TSecretRotationDbFn,
TSecretRotationEncData
} from "./secret-rotation-queue-types";
import { BadRequestError } from "@app/lib/errors";
export type TSecretRotationQueueFactory = ReturnType<typeof secretRotationQueueFactory>;
@@ -70,7 +70,7 @@ export const secretRotationQueueFactory = ({
}: TSecretRotationQueueFactoryDep) => {
const addToQueue = async (rotationId: string, interval: number) => {
const appCfg = getConfig();
queue.queue(
await queue.queue(
QueueName.SecretRotation,
QueueJobs.SecretRotation,
{ rotationId },
@@ -265,7 +265,7 @@ export const secretRotationQueueFactory = ({
return {
...el,
secretId: id,
secretBlindIndex: el.secretBlindIndex as string
secretBlindIndex: el.secretBlindIndex
};
}),
tx
@@ -288,7 +288,7 @@ export const secretRotationQueueFactory = ({
logger.error(error);
if (error instanceof DisableRotationErrors) {
if (job.id) {
queue.stopRepeatableJobByJobId(QueueName.SecretRotation, job.id);
await queue.stopRepeatableJobByJobId(QueueName.SecretRotation, job.id);
}
}