From ee8db698b3ac1088cf7a5f8e71899e6d6b821de0 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 13 Apr 2021 15:00:47 +1000 Subject: [PATCH] Allow constant condition for loops --- .eslintrc.json | 1 + src/lib/waku_store/index.ts | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 67d7fd21d7..27db61f841 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,6 +25,7 @@ "error", { "newlines-between": "always", "alphabetize": { "order": "asc" } } ], + "no-constant-condition": ["error", { "checkLoops": false }], "sort-imports": [ "error", { "ignoreDeclarationSort": true, "ignoreCase": true } diff --git a/src/lib/waku_store/index.ts b/src/lib/waku_store/index.ts index 70bd4268e7..b18cf6b387 100644 --- a/src/lib/waku_store/index.ts +++ b/src/lib/waku_store/index.ts @@ -32,7 +32,7 @@ export class WakuStore { const messages: WakuMessage[] = []; let cursor = undefined; - do { + while (true) { try { const { stream } = await connection.newStream(StoreCodec); try { @@ -92,7 +92,6 @@ export class WakuStore { err ); } - // eslint-disable-next-line no-constant-condition - } while (true); + } } }