π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove five Photos lint suppressions
Manav Rathi3acd00b8f4a9
diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsxindex c281cf3019..e94f75dbc7 100644--- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx+++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx@@ -49,9 +49,7 @@ const AlbumCastDialogContents: React.FC<AlbumCastDialogProps> = ({const castHost = new URL(castURL).host;useEffect(() => {- // @ts-expect-error TODO: why is this needed- // eslint-disable-next-line @typescript-eslint/dot-notation- setBrowserCanCast(typeof window["chrome"] != "undefined");+ setBrowserCanCast(typeof window.chrome != "undefined");}, []);const onSubmit: SingleInputFormProps["onSubmit"] = useCallback(diff --git a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsxindex 6ab61cfde6..1fb1c1fe3c 100644--- a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx+++ b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx@@ -19,6 +19,7 @@ import { useTheme } from "@mui/material/styles";import { ensureLocalUser } from "ente-accounts/services/user";import { ActivityIndicator } from "ente-base/components/mui/ActivityIndicator";import type { ModalVisibilityProps } from "ente-base/components/utils/modal";+import { isSxArray } from "ente-base/components/utils/sx";import { useBaseContext } from "ente-base/context";import { downloadManager } from "ente-gallery/services/download";import { uniqueFilesByID } from "ente-gallery/utils/file";@@ -1850,12 +1851,7 @@ const FloatingIconButton: React.FC<IconButtonProps> = ({ sx, ...props }) => {};const mergedSx =- sx == null- ? baseSx- : Array.isArray(sx)- ? // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment- [baseSx, ...sx]- : [baseSx, sx];+ sx == null ? baseSx : isSxArray(sx) ? [baseSx, ...sx] : [baseSx, sx];return <IconButton {...props} sx={mergedSx} />;};diff --git a/web/apps/photos/src/components/gallery/reducer.ts b/web/apps/photos/src/components/gallery/reducer.tsindex dae124c608..0c41c2096e 100644--- a/web/apps/photos/src/components/gallery/reducer.ts+++ b/web/apps/photos/src/components/gallery/reducer.ts@@ -1396,15 +1396,13 @@ const findCoverFiles = (let coverFile: EnteFile | undefined;- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition- const coverID = collection.pubMagicMetadata?.data?.coverID;+ const coverID = collection.pubMagicMetadata?.data.coverID;if (typeof coverID == "number" && coverID > 0) {coverFile = collectionFiles.find(({ id }) => id === coverID);}if (!coverFile) {- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition- if (collection.pubMagicMetadata?.data?.asc) {+ if (collection.pubMagicMetadata?.data.asc) {coverFile = collectionFiles[collectionFiles.length - 1];} else {coverFile = collectionFiles[0];diff --git a/web/apps/photos/src/utils/chromecast-sender.ts b/web/apps/photos/src/utils/chromecast-sender.tsindex 6f6801fd02..f200f233ed 100644--- a/web/apps/photos/src/utils/chromecast-sender.ts+++ b/web/apps/photos/src/utils/chromecast-sender.ts@@ -4,6 +4,7 @@declare global {interface Window {cast: typeof cast;+ chrome?: unknown;__onGCastApiAvailable(available: boolean, reason?: string): void;}}