This commit is contained in:
Manav Rathi
2024-11-20 10:16:03 +05:30
parent ebe0292cb4
commit 8f0ec55e54
8 changed files with 16 additions and 18 deletions

View File

@@ -24,7 +24,6 @@ export default [
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "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",
@@ -34,11 +33,8 @@ export default [
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-generic-constructors": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-unused-expressions": "off",

View File

@@ -1105,7 +1105,7 @@ const ManageParticipant: React.FC<ManageParticipantProps> = ({
<Trans
i18nKey="REMOVE_PARTICIPANT_MESSAGE"
values={{
selectedEmail: `${selectedParticipant.email}`,
selectedEmail: selectedParticipant.email,
}}
/>
),

View File

@@ -107,7 +107,7 @@ export const UploadTypeSelector: React.FC<UploadTypeSelectorProps> = ({
type OptionType = "files" | "folders" | "zips";
type OptionsProps = {
interface OptionsProps {
intent: UploadTypeSelectorIntent;
/** Called when the user selects one of the provided options. */
onSelect: (option: OptionType) => void;

View File

@@ -29,10 +29,10 @@ import { syncTrash } from "services/trashService";
import { SelectedState } from "types/gallery";
import { getSelectedFiles } from "utils/file";
export type DeduplicateContextType = {
export interface DeduplicateContextType {
isOnDeduplicatePage: boolean;
collectionNameMap: Map<number, string>;
};
}
export const DeduplicateContext = createContext<DeduplicateContextType>({
isOnDeduplicatePage: false,

View File

@@ -966,7 +966,7 @@ class ExportService {
exportDir: string,
fileUID: string,
collectionExportPath: string,
fileStream: ReadableStream<any>,
fileStream: ReadableStream,
file: EnteFile,
) {
const fs = ensureElectron().fs;

View File

@@ -17,6 +17,8 @@ const PUBLIC_COLLECTION_FILES_TABLE = "public-collection-files";
const PUBLIC_COLLECTIONS_TABLE = "public-collections";
const PUBLIC_REFERRAL_CODE = "public-referral-code";
// Fix this once we can trust the types.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-template-expression
export const getPublicCollectionUID = (token: string) => `${token}`;
const getPublicCollectionLastSyncTimeKey = (collectionUID: string) =>

View File

@@ -131,7 +131,7 @@ class UIService {
// UPLOAD LEVEL STATES
private uploadPhase: UploadPhase = "preparing";
private filenames: Map<number, string> = new Map();
private filenames = new Map<number, string>();
private hasLivePhoto: boolean = false;
private uploadProgressView: boolean = false;
@@ -770,14 +770,14 @@ const makeUploadItemWithCollectionIDAndName = (
*
* See: [Note: Intermediate file types during upload].
*/
type ClusteredUploadItem = {
interface ClusteredUploadItem {
localID: number;
collectionID: number;
fileName: string;
isLivePhoto: boolean;
uploadItem?: UploadItem;
livePhotoAssets?: LivePhotoAssets;
};
}
/**
* The file that we hand off to the uploader. Essentially

View File

@@ -3,7 +3,7 @@ import type { User } from "@ente/shared/user/types";
import { FilesDownloadProgressAttributes } from "components/FilesDownloadProgress";
import { TimeStampListItem } from "components/PhotoList";
export type SelectedState = {
export interface SelectedState {
[k: number]: boolean;
ownCount: number;
count: number;
@@ -14,7 +14,7 @@ export type SelectedState = {
* {@link collectionID} logic).
*/
context: SelectionContext | undefined;
};
}
export type SetSelectedState = React.Dispatch<
React.SetStateAction<SelectedState>
>;
@@ -33,12 +33,12 @@ export type SetFilesDownloadProgressAttributesCreator = (
isHidden?: boolean,
) => SetFilesDownloadProgressAttributes;
export type MergedSourceURL = {
export interface MergedSourceURL {
original: string;
converted: string;
};
}
export type GalleryContextType = {
export interface GalleryContextType {
showPlanSelectorModal: () => void;
setActiveCollectionID: (collectionID: number) => void;
/** Newer and almost equivalent alternative to setActiveCollectionID. */
@@ -55,4 +55,4 @@ export type GalleryContextType = {
isClipSearchResult: boolean;
setSelectedFiles: (value) => void;
selectedFile: SelectedState;
};
}