Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix updated rule

Manav Rathif69832ea165b
diff --git a/web/apps/cast/src/services/pair.ts b/web/apps/cast/src/services/pair.ts
index ae0a8fd98c..cc30ef1d1c 100644
--- a/web/apps/cast/src/services/pair.ts
+++ b/web/apps/cast/src/services/pair.ts
@@ -79,11 +79,6 @@ export const register = async (): Promise<Registration> => {
// Register keypair with museum to get a pairing code.
let pairingCode: string | undefined;
- // [TODO: spurious while(true) eslint warning].
- // eslint has fixed this spurious warning, but we're not on the latest
- // version yet, so add a disable.
- // https://github.com/eslint/eslint/pull/18286
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (true) {
try {
pairingCode = await castGateway.registerDevice(publicKeyB64);
diff --git a/web/packages/build-config/eslintrc-base.mjs b/web/packages/build-config/eslintrc-base.mjs
index 78f2d1363f..779cfe46b2 100644
--- a/web/packages/build-config/eslintrc-base.mjs
+++ b/web/packages/build-config/eslintrc-base.mjs
@@ -64,6 +64,11 @@ export default tseslint.config(
// to do at one point), rely on the JS's native undefined property
// access exception since that conveys more information in the logs.
"@typescript-eslint/no-non-null-assertion": "off",
+ // Allow `while(true)` etc.
+ "@typescript-eslint/no-unnecessary-condition": [
+ "error",
+ { allowConstantLoopConditions: true },
+ ],
},
},
);
diff --git a/web/packages/new/photos/services/user-entity/index.ts b/web/packages/new/photos/services/user-entity/index.ts
index ea6dcb57e3..5321a2c642 100644
--- a/web/packages/new/photos/services/user-entity/index.ts
+++ b/web/packages/new/photos/services/user-entity/index.ts
@@ -134,7 +134,6 @@ export const pullUserEntities = async (
const entityKeyB64 = await getOrCreateEntityKeyB64(type, masterKey);
let sinceTime = (await savedLatestUpdatedAt(type)) ?? 0;
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (true) {
const diff = await userEntityDiff(type, sinceTime, entityKeyB64);
if (diff.length == 0) break;