diff --git a/.eslintrc.js b/.eslintrc.js index b77e37db..b6a6064e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,21 +26,14 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-unused-vars': 'warn', 'import/first': 'error', 'import/no-duplicates': 'error', 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error', - '@typescript-eslint/ban-types': [ - 'error', - { - extendDefaults: true, - types: { - '{}': false, - Object: false, - }, - }, - ], + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/no-unused-expressions': 'off', 'prettier/prettier': ['error', { endOfLine: 'auto' }], }, }; diff --git a/src/api/integrations/event/event.manager.ts b/src/api/integrations/event/event.manager.ts index 4b4a310c..fe3256c9 100644 --- a/src/api/integrations/event/event.manager.ts +++ b/src/api/integrations/event/event.manager.ts @@ -105,7 +105,7 @@ export class EventManager { instanceName: string; origin: string; event: string; - data: Object; + data: object; serverUrl: string; dateTime: string; sender: string; diff --git a/src/api/services/channel.service.ts b/src/api/services/channel.service.ts index 4b39520e..033a3224 100644 --- a/src/api/services/channel.service.ts +++ b/src/api/services/channel.service.ts @@ -431,7 +431,7 @@ export class ChannelStartupService { return data; } - public async sendDataWebhook(event: Events, data: T, local = true, integration?: string[]) { + public async sendDataWebhook(event: Events, data: T, local = true, integration?: string[]) { const serverUrl = this.configService.get('SERVER').URL; const tzoffset = new Date().getTimezoneOffset() * 60000; //offset in milliseconds const localISOTime = new Date(Date.now() - tzoffset).toISOString(); diff --git a/src/cache/localcache.ts b/src/cache/localcache.ts index 2aa2007e..f7769e58 100644 --- a/src/cache/localcache.ts +++ b/src/cache/localcache.ts @@ -53,7 +53,7 @@ export class LocalCache implements ICache { async hGet(key: string, field: string) { try { - const data = LocalCache.localCache.get(this.buildKey(key)) as Object; + const data = LocalCache.localCache.get(this.buildKey(key)) as object; if (data && field in data) { return JSON.parse(data[field], BufferJSON.reviver); @@ -84,7 +84,7 @@ export class LocalCache implements ICache { async hDelete(key: string, field: string) { try { - const data = LocalCache.localCache.get(this.buildKey(key)) as Object; + const data = LocalCache.localCache.get(this.buildKey(key)) as object; if (data && field in data) { delete data[field];