Continue ESLINT9 Migration (#13795)

Might already fix #13793
This commit is contained in:
Félix Malfait
2025-08-10 23:25:58 +02:00
committed by GitHub
parent df68cf98d4
commit 464a480043
2549 changed files with 6262 additions and 5481 deletions
@@ -22,7 +22,7 @@ import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-membe
import { isWorkDomain } from 'src/utils/is-work-email';
@Injectable()
// eslint-disable-next-line @nx/workspace-inject-workspace-repository
export class ApprovedAccessDomainService {
constructor(
@InjectRepository(ApprovedAccessDomainEntity, 'core')
@@ -8,7 +8,7 @@ import { AuthProviderEnum } from 'src/engine/core-modules/workspace/types/worksp
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
@Injectable()
// eslint-disable-next-line @nx/workspace-inject-workspace-repository
export class AuthSsoService {
constructor(
@InjectRepository(Workspace, 'core')
@@ -14,7 +14,7 @@ export class GoogleAPIsOauthRequestCodeStrategy extends GoogleAPIsOauthCommonStr
super(twentyConfigService);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
authenticate(req: any, options: any) {
options = {
@@ -9,7 +9,7 @@ export class MicrosoftAPIsOauthRequestCodeStrategy extends MicrosoftAPIsOauthCom
super(twentyConfigService);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
authenticate(req: any, options: any) {
options = {
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
@@ -27,7 +27,7 @@ import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twent
import { UserService } from 'src/engine/core-modules/user/services/user.service';
@Injectable()
// eslint-disable-next-line @nx/workspace-inject-workspace-repository
export class EmailVerificationService {
constructor(
@InjectRepository(AppToken, 'core')
@@ -31,7 +31,7 @@ export const objectRecordChangedValues = (
return acc;
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
{} as Record<string, { before: any; after: any }>,
);
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
import { Module } from '@nestjs/common';
import { JwtModule as NestJwtModule } from '@nestjs/jwt';
@@ -8,7 +8,7 @@ import {
} from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
export class KeyValuePairService<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
> {
@@ -11,13 +11,13 @@ import { LOGGER_DRIVER } from 'src/engine/core-modules/logger/logger.constants';
export class LoggerService implements LoggerServiceInterface {
constructor(@Inject(LOGGER_DRIVER) private driver: LoggerServiceInterface) {}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
log(message: any, category: string, ...optionalParams: any[]) {
this.driver.log.apply(this.driver, [message, category, ...optionalParams]);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
error(message: any, category: string, ...optionalParams: any[]) {
this.driver.error.apply(this.driver, [
@@ -27,13 +27,13 @@ export class LoggerService implements LoggerServiceInterface {
]);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
warn(message: any, category: string, ...optionalParams: any[]) {
this.driver.warn.apply(this.driver, [message, category, ...optionalParams]);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
debug?(message: any, category: string, ...optionalParams: any[]) {
this.driver.debug?.apply(this.driver, [
@@ -43,7 +43,7 @@ export class LoggerService implements LoggerServiceInterface {
]);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
verbose?(message: any, category: string, ...optionalParams: any[]) {
this.driver.verbose?.apply(this.driver, [
@@ -17,18 +17,10 @@ export interface MessageQueueProcessorOptions {
scope?: Scope;
}
/**
* Represents a worker that is able to process jobs from the queue.
* @param queueName name of the queue to process
*/
export function Processor(queueName: MessageQueue): ClassDecorator;
/**
* Represents a worker that is able to process jobs from the queue.
* @param processorOptions processor options
*/
export function Processor(
processorOptions: MessageQueueProcessorOptions,
): ClassDecorator;
export function Processor(
queueNameOrOptions: string | MessageQueueProcessorOptions,
): ClassDecorator {
@@ -37,7 +29,7 @@ export function Processor(
? queueNameOrOptions
: { queueName: queueNameOrOptions };
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
return (target: Function) => {
SetMetadata(SCOPE_OPTIONS_METADATA, options)(target);
SetMetadata(PROCESSOR_METADATA, options)(target);
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
import { Injectable, type Type } from '@nestjs/common';
import { Reflector } from '@nestjs/core';
@@ -5,7 +5,7 @@ import {
} from 'class-validator';
export const AssertOrWarn = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
condition: (object: any, value: any) => boolean,
validationOptions?: ValidationOptions,
@@ -1,4 +1,4 @@
/* eslint-disable @nx/workspace-inject-workspace-repository */
import { InjectRepository } from '@nestjs/typeorm';
import { TypeOrmQueryService } from '@ptc-org/nestjs-query-typeorm';
@@ -6,7 +6,7 @@ import { mergeUserVars } from 'src/engine/core-modules/user/user-vars/utils/merg
@Injectable()
export class UserVarsService<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
> {
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
import { Module } from '@nestjs/common';
import { KeyValuePairModule } from 'src/engine/core-modules/key-value-pair/key-value-pair.module';
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
@@ -34,7 +34,7 @@ import { type Workspace } from 'src/engine/core-modules/workspace/workspace.enti
import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
@Injectable()
// eslint-disable-next-line @nx/workspace-inject-workspace-repository
export class WorkspaceInvitationService {
constructor(
@InjectRepository(AppToken, 'core')