From d7ca7a30a8cc3257699186f3e4d68dc4f12448fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <git@minelli.me> Date: Fri, 19 Apr 2024 22:36:52 +0200 Subject: [PATCH] Sonar => Remove code smells --- helpers/LazyVal.ts | 2 +- helpers/recursiveFilesStats/RecursiveFilesStats.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/LazyVal.ts b/helpers/LazyVal.ts index 90c7217..a06ba8b 100644 --- a/helpers/LazyVal.ts +++ b/helpers/LazyVal.ts @@ -9,7 +9,7 @@ class LazyVal<T> { get value(): Promise<T> { return new Promise<T>(resolve => { if ( this.val === undefined ) { - void Promise.resolve(this.valLoader()).then((value: T) => { + Promise.resolve(this.valLoader()).then((value: T) => { this.val = value; resolve(value); }); diff --git a/helpers/recursiveFilesStats/RecursiveFilesStats.ts b/helpers/recursiveFilesStats/RecursiveFilesStats.ts index e931738..a71bffd 100644 --- a/helpers/recursiveFilesStats/RecursiveFilesStats.ts +++ b/helpers/recursiveFilesStats/RecursiveFilesStats.ts @@ -75,9 +75,9 @@ class RecursiveFilesStats { if ( callback ) { fileDir.forEach(item => { - void this.getStat(item.path, absoluteBasePath, options).then(stat => { + this.getStat(item.path, absoluteBasePath, options).then(stat => { if ( stat.isDirectory!() ) { - void this.getFiles(absoluteBasePath, item.path, options, [], callback).then(); + this.getFiles(absoluteBasePath, item.path, options, [], callback).then(); } callback(item.path, stat); }); -- GitLab