refactor(eslint): update TypeScript object type usage and adjust linting rules

- Change usage of `Object` to `object` in various files for better type safety.
- Update ESLint configuration to change `@typescript-eslint/no-unused-vars` from 'error' to 'warn' and disable certain rules related to object types.
This commit is contained in:
Davidson Gomes
2025-09-18 14:48:56 -03:00
parent e4da6a1763
commit 9d42ad3495
4 changed files with 8 additions and 15 deletions

View File

@@ -105,7 +105,7 @@ export class EventManager {
instanceName: string;
origin: string;
event: string;
data: Object;
data: object;
serverUrl: string;
dateTime: string;
sender: string;

View File

@@ -431,7 +431,7 @@ export class ChannelStartupService {
return data;
}
public async sendDataWebhook<T = any>(event: Events, data: T, local = true, integration?: string[]) {
public async sendDataWebhook<T extends object = any>(event: Events, data: T, local = true, integration?: string[]) {
const serverUrl = this.configService.get<HttpServer>('SERVER').URL;
const tzoffset = new Date().getTimezoneOffset() * 60000; //offset in milliseconds
const localISOTime = new Date(Date.now() - tzoffset).toISOString();