This commit is contained in:
Manav Rathi
2024-11-20 09:57:16 +05:30
parent fdf0e3f0ad
commit 4e5c99aafe
7 changed files with 8 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
import { createContext } from "react";
export const OverflowMenuContext = createContext({
// eslint-disable-next-line @typescript-eslint/no-empty-function
close: () => {},
});

View File

@@ -22,16 +22,8 @@ export default [
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unnecessary-template-expression": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/prefer-promise-reject-errors": "off",
"@typescript-eslint/no-useless-constructor": "off",
"react-hooks/exhaustive-deps": "off",
/** TODO: New during eslint 8=>9 migration */
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": "off",
},
},
];

View File

@@ -2,13 +2,9 @@ import log from "@/base/log";
import axios, { type AxiosRequestConfig, type AxiosResponse } from "axios";
import { ApiError, isApiErrorResponse } from "../error";
interface IHTTPHeaders {
[headerKey: string]: any;
}
type IHTTPHeaders = Record<string, any>;
interface IQueryPrams {
[paramName: string]: any;
}
type IQueryPrams = Record<string, any>;
/**
* Service to manage all HTTP calls.

View File

@@ -5,8 +5,6 @@ import { getToken } from "../storage/localStorage/helpers";
import HTTPService from "./HTTPService";
class CastGateway {
constructor() {}
public async getCastData(code: string): Promise<string | null> {
let resp;
try {
@@ -78,6 +76,7 @@ class CastGateway {
await HTTPService.post(
await apiURL("/cast/cast-data/"),
{
// eslint-disable-next-line @typescript-eslint/no-unnecessary-template-expression
deviceCode: `${code}`,
encPayload: castPayload,
collectionID: collectionID,

View File

@@ -75,6 +75,7 @@ export const migrateKVToken = async (user: unknown) => {
typeof oldLSUser.token == "string" &&
!(await getKVS("token"));
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
user &&
typeof user == "object" &&
"id" in user &&
@@ -82,6 +83,7 @@ export const migrateKVToken = async (user: unknown) => {
? await setKV("userID", user.id)
: await removeKV("userID");
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
user &&
typeof user == "object" &&
"token" in user &&

View File

@@ -200,6 +200,6 @@ declare module "@mui/material/styles" {
faint: number;
}
type AvatarColors = Array<string>;
type AvatarColors = string[];
}
export {};

View File

@@ -16,7 +16,7 @@ export const getActualKey = async () => {
encryptionKeyAttributes.key,
);
return key;
} catch (e) {
} catch {
throw new Error(CustomError.KEY_MISSING);
}
};