Skip to content

Commit 27029a7

Browse files
committed
refactor: fix linter problems
1 parent fe445cc commit 27029a7

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/services/files/files.worker.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class FileWalker {
252252
}
253253

254254
private isExcluded(path: string): boolean {
255-
if (!this.searchConfig.exclude) {
255+
if (this.searchConfig.exclude == null) {
256256
return false;
257257
}
258258
return this.searchConfig.exclude.some((ex) => path.includes(ex));
@@ -275,22 +275,23 @@ class FileWalker {
275275
private processQueue(): void {
276276
while (this.procs < MAX_PROCS && this.taskQueue.length > 0) {
277277
const task = this.taskQueue.shift();
278-
if (!task || !task.path) continue;
278+
if (!task?.path) {
279+
continue;
280+
}
279281

280282
switch (task.operation) {
281283
case ETaskOperation.explore:
282284
this.run(task.path).catch((error) => {
283-
console.warn(`Explore task failed for ${task.path}:`, error);
284285
this.completeTask();
285286
});
286287
break;
287288
case ETaskOperation.getFolderSize:
288-
this.runGetFolderSize(task.path);
289+
this.runGetFolderSize(task.path).catch(() => {});
289290
break;
290291
case ETaskOperation.getFolderSizeChild:
291-
this.runGetFolderSizeChild(task.path, task.sizeCollector!).catch(
292-
(error) => {
293-
if (!task.sizeCollector) {
292+
this.runGetFolderSizeChild(task.path, task.sizeCollector).catch(
293+
() => {
294+
if (task.sizeCollector == null) {
294295
return;
295296
}
296297

0 commit comments

Comments
 (0)