diff --git a/web/apps/cast/.eslintrc.js b/web/apps/cast/.eslintrc.js
index f133a685b7..b1aff972c9 100644
--- a/web/apps/cast/.eslintrc.js
+++ b/web/apps/cast/.eslintrc.js
@@ -1,13 +1,4 @@
module.exports = {
- // When root is set to true, ESLint will stop looking for configuration files in parent directories.
- // This is required here to ensure desktop picks the right eslint config, where this app is
- // packaged as a submodule.
- root: true,
- extends: ["@ente/eslint-config"],
- parser: "@typescript-eslint/parser",
- parserOptions: {
- tsconfigRootDir: __dirname,
- project: "./tsconfig.json",
- },
- ignorePatterns: [".eslintrc.js", "out", "next.config.js"],
+ extends: ["@/build-config/eslintrc-next"],
+ ignorePatterns: ["next.config.js", "next-env.d.ts"],
};
diff --git a/web/apps/cast/src/pages/index.tsx b/web/apps/cast/src/pages/index.tsx
index 2a993972bd..32db075582 100644
--- a/web/apps/cast/src/pages/index.tsx
+++ b/web/apps/cast/src/pages/index.tsx
@@ -3,7 +3,7 @@ import EnteSpinner from "@ente/shared/components/EnteSpinner";
import { styled } from "@mui/material";
import { PairingCode } from "components/PairingCode";
import { useRouter } from "next/router";
-import { useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import { readCastData, storeCastData } from "services/cast-data";
import { getCastData, register } from "services/pair";
import { advertiseOnChromecast } from "../services/chromecast";
@@ -17,7 +17,7 @@ export default function Index() {
useEffect(() => {
if (!pairingCode) {
- register().then((r) => {
+ void register().then((r) => {
setPublicKeyB64(r.publicKeyB64);
setPrivateKeyB64(r.privateKeyB64);
setPairingCode(r.pairingCode);
diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsx
index 7dd0f41832..1da1a9d966 100644
--- a/web/apps/cast/src/pages/slideshow.tsx
+++ b/web/apps/cast/src/pages/slideshow.tsx
@@ -3,7 +3,7 @@ import { ensure } from "@/utils/ensure";
import { styled } from "@mui/material";
import { FilledCircleCheck } from "components/FilledCircleCheck";
import { useRouter } from "next/router";
-import { useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import { readCastData } from "services/cast-data";
import { isChromecast } from "services/chromecast";
import { imageURLGenerator } from "services/render";
@@ -25,11 +25,11 @@ export default function Slideshow() {
const urlGenerator = imageURLGenerator(ensure(readCastData()));
while (!stop) {
const { value: url, done } = await urlGenerator.next();
- if (done || !url) {
+ if (done == true || !url) {
// No items in this callection can be shown.
setIsEmpty(true);
// Go back to pairing screen after 5 seconds.
- setTimeout(pair, 5000);
+ setTimeout(() => pair, 5000);
return;
}
@@ -37,7 +37,7 @@ export default function Slideshow() {
}
} catch (e) {
log.error("Failed to prepare generator", e);
- pair();
+ void pair();
}
};
@@ -64,7 +64,7 @@ const PairingComplete: React.FC = () => {
- We're preparing your album.
+ {"We're preparing your album"}.
This should only take a few seconds.