Fix lints

This commit is contained in:
Manav Rathi
2024-06-19 13:30:18 +05:30
parent b52192df6a
commit 04fd2f8007
3 changed files with 9 additions and 18 deletions

View File

@@ -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"],
};

View File

@@ -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);

View File

@@ -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 = () => {
<FilledCircleCheck />
<h2>Pairing Complete</h2>
<p>
We're preparing your album.
{"We're preparing your album"}.
<br /> This should only take a few seconds.
</p>
</Message>