From a720ca485d2ee598e79e8f9711a66367a713f216 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Wed, 27 Nov 2024 16:42:16 +0200 Subject: [PATCH] chore: fix no-unused-vars lint errors --- packages/resources-provider-plugin/src/index.ts | 2 +- .../resources-provider-plugin/src/lib/filestorage.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/resources-provider-plugin/src/index.ts b/packages/resources-provider-plugin/src/index.ts index d61e61eaf..6c9170cb7 100644 --- a/packages/resources-provider-plugin/src/index.ts +++ b/packages/resources-provider-plugin/src/index.ts @@ -256,7 +256,7 @@ module.exports = (server: ResourceProviderApp): Plugin => { } } }) - } catch (error) { + } catch (_error) { failed.push(resType) } }) diff --git a/packages/resources-provider-plugin/src/lib/filestorage.ts b/packages/resources-provider-plugin/src/lib/filestorage.ts index 66b1536e3..feeeed652 100644 --- a/packages/resources-provider-plugin/src/lib/filestorage.ts +++ b/packages/resources-provider-plugin/src/lib/filestorage.ts @@ -57,7 +57,7 @@ export class FileStore implements IResourceStore { try { await this.checkPath(this.savePath) - } catch (error) { + } catch (_error) { throw new Error(`Unable to create ${this.savePath}!`) } return await this.createSavePaths(enabledResTypes) @@ -74,13 +74,13 @@ export class FileStore implements IResourceStore { try { await access(this.resources[t].path, constants.W_OK | constants.R_OK) this.debug(`${this.resources[t].path} - OK....`) - } catch (error) { + } catch (_error) { this.debug(`${this.resources[t].path} NOT available...`) this.debug(`Creating ${this.resources[t].path} ...`) try { await mkdir(this.resources[t].path, { recursive: true }) this.debug(`Created ${this.resources[t].path} - OK....`) - } catch (error) { + } catch (_error) { result.error = true result.message += `ERROR creating ${this.resources[t].path} folder\r\n ` } @@ -217,7 +217,7 @@ export class FileStore implements IResourceStore { ) this.debug(`${path} - OK...`) return true - } catch (error) { + } catch (_error) { // if not then create it this.debug(`${path} does NOT exist...`) this.debug(`Creating ${path} ...`) @@ -225,7 +225,7 @@ export class FileStore implements IResourceStore { await mkdir(path, { recursive: true }) this.debug(`Created ${path} - OK...`) return true - } catch (error) { + } catch (_error) { throw new Error(`Unable to create ${path}!`) } }