From 3b0544d779f7ec1c4d8b2fdde350a6777ee30d34 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 20 Nov 2024 10:05:54 +0530 Subject: [PATCH] Prune --- web/apps/photos/eslint.config.mjs | 5 +---- .../photos/src/components/PhotoViewer/FileInfo/MapBox.tsx | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/apps/photos/eslint.config.mjs b/web/apps/photos/eslint.config.mjs index 43a57b1159..159a00a6f0 100644 --- a/web/apps/photos/eslint.config.mjs +++ b/web/apps/photos/eslint.config.mjs @@ -47,14 +47,11 @@ export default [ "@typescript-eslint/restrict-plus-operands": "off", "@typescript-eslint/no-meaningless-void-operator": "off", "react-hooks/exhaustive-deps": "off", - "react-hooks/rules-of-hooks": "off", + "react-refresh/only-export-components": "off", /** TODO: New during eslint 8=>9 migration */ "@typescript-eslint/no-unused-expressions": "off", - // "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/prefer-regexp-exec": "off", - "@typescript-eslint/no-require-imports": "off", }, }, ]; diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx index b6a6bf79b7..25d3cc25d3 100644 --- a/web/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx +++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx @@ -7,8 +7,10 @@ import { useEffect, useRef } from "react"; import "leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css"; // Re-uses images from ~leaflet package import "leaflet/dist/leaflet.css"; +// eslint-disable-next-line @typescript-eslint/no-require-imports haveWindow() && require("leaflet-defaulticon-compatibility"); const L = haveWindow() + // eslint-disable-next-line @typescript-eslint/no-require-imports ? (require("leaflet") as typeof import("leaflet")) : null;