From 352c083e83fcbbafb6b1c6a455102c701e738d8d Mon Sep 17 00:00:00 2001 From: Loris Bettazza Date: Wed, 12 Oct 2022 00:17:48 +0200 Subject: [PATCH] Fix lint errors --- src/config.ts | 2 +- test/networking/messageGenerators.spec.ts | 6 +++--- test/setup-tests.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.ts b/src/config.ts index 458fdf5..46e9b1b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -2,7 +2,7 @@ import convict from "convict"; import { existsSync } from "fs"; // Define a schema -export let config = convict({ +export const config = convict({ allowedFiletypes: { doc: "Filetypes that are synchronized to the game.", format: "Array", diff --git a/test/networking/messageGenerators.spec.ts b/test/networking/messageGenerators.spec.ts index 43ad449..482af6d 100644 --- a/test/networking/messageGenerators.spec.ts +++ b/test/networking/messageGenerators.spec.ts @@ -37,7 +37,7 @@ describe("messageGenerators", () => { const msg = fileRemovalEventToMsg({ path: "sub/test.js" }); const result = (msg?.params as FileData).filename; - if (result && result.hasOwnProperty("filename")) expect(result).to.eq("/sub/test.js"); + if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("/sub/test.js"); }); }); @@ -46,7 +46,7 @@ describe("messageGenerators", () => { const msg = fileRemovalEventToMsg({ path: "test.js" }); const result = (msg?.params as FileData).filename; - if (result && result.hasOwnProperty("filename")) expect(result).to.eq("test.js"); + if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("test.js"); }); }); @@ -55,7 +55,7 @@ describe("messageGenerators", () => { const msg = fileRemovalEventToMsg({ path: "/sub/test.js" }); const result = (msg?.params as FileData).filename; - if (result && result.hasOwnProperty("filename")) expect(result).to.eq("/sub/test.js"); + if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("/sub/test.js"); }); }); }); diff --git a/test/setup-tests.ts b/test/setup-tests.ts index 898ac5e..e4087b6 100644 --- a/test/setup-tests.ts +++ b/test/setup-tests.ts @@ -1,5 +1,5 @@ import chai from "chai"; -import { createSandbox, stub } from "sinon"; +import { createSandbox } from "sinon"; import sinonChai from "sinon-chai"; export async function mochaGlobalSetup() {